1 | static void ai_spec_compareNumbers(S term) {
|
2 | for ping (Web web : indexedWebs(term)) |
3 | ai_spec_compareNumbers(web); |
4 | } |
5 | |
6 | static void ai_spec_compareNumbers(Web web) {
|
7 | for (WebRelation r : web_relationsNamed(web, "is bigger than?")) {
|
8 | S a = web_text(r.a), b = web_text(r.b); |
9 | if (isInteger(a) && isInteger(b)) {
|
10 | int cmp = bigint(a).compareTo(bigint(b)); |
11 | S rel = cmp > 0 ? "is bigger than" : "is not bigger than"; |
12 | ai_postTriple(a, rel, b); |
13 | } |
14 | } |
15 | } |
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: | 627 / 651 |
| Referenced in: | [show references] |