Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1025739 // philosophyBot1_math

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (7192L/47K).

svoid philosophyBot1_math(PhilosophyBot1 bot) {
  bot.addNativePredicate("$x >= $y",
    (map) -> cmp(parseBigInt(map.get("$x")), parseBigInt(map.get("$y"))) >= 0);
  bot.addNativePredicate("$x <= $y",
    (map) -> cmp(parseBigInt(map.get("$x")), parseBigInt(map.get("$y"))) <= 0);
  bot.addNativePredicate("$x > $y",
    (map) -> cmp(parseBigInt(map.get("$x")), parseBigInt(map.get("$y"))) > 0);
  bot.addNativePredicate("$x < $y",
    (map) -> cmp(parseBigInt(map.get("$x")), parseBigInt(map.get("$y"))) < 0);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025739
Snippet name: philosophyBot1_math
Eternal ID of this version: #1025739/3
Text MD5: 9952554bb3f31f14d95a4b114fe74961
Transpilation MD5: f63b08351925c6788d9fab80655eb110
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-10-16 22:31:47
Source code size: 522 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 222 / 336
Version history: 2 change(s)
Referenced in: [show references]