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: | 291 / 422 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1025742 - philosophyBot1_bool #1025748 - philosophyBot1_factStore #1025784 - philosophyBot1_iotaHandler - include iota() function (basically for testing) #1027148 - philosophyBot1_addDeepReplacement (v2 allowing other transformers too) |