static void ai_spec_compareNumbers(S term) { for ping (Web web : indexedWebs(term)) ai_spec_compareNumbers(web); } static void ai_spec_compareNumbers(Web web) { for (WebRelation r : web_relationsNamed(web, "is bigger than?")) { S a = web_text(r.a), b = web_text(r.b); if (isInteger(a) && isInteger(b)) { int cmp = bigint(a).compareTo(bigint(b)); S rel = cmp > 0 ? "is bigger than" : "is not bigger than"; ai_postTriple(a, rel, b); } } }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1012016 |
Snippet name: | ai_spec_compareNumbers |
Eternal ID of this version: | #1012016/1 |
Text MD5: | 334a93d038c38045053ca403bed723d5 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-16 04:03:51 |
Source code size: | 491 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 417 / 429 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1012037 - ai_spec_compareNumbers_triple |