Commit graph

58 commits

Author SHA1 Message Date
Anton-4
eee85fa45d
moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02:00
Brian Carroll
e3812b4bf3
builtins: implement i128 multiplication 2022-06-23 08:29:43 +01:00
Brian Carroll
320bdcc13b
wasm: implement all multiplication operators 2022-06-22 23:36:01 +01:00
Brian Carroll
f4ec2617fa
wasm: implement all subtraction operators (checked, wrapping, panicking, and saturated) 2022-06-22 22:54:09 +01:00
Brian Carroll
b1193e4134
wasm: implement all addition operators (wrapping, panicking, saturating, and checked) 2022-06-22 22:11:46 +01:00
Brian Carroll
d7ac8cfcbc
wasm: implement addOrPanic in Zig 2022-06-22 22:11:44 +01:00
Brian Carroll
9491d5fae9
Merge branch 'trunk' into update_zig_09 2022-04-15 21:17:25 +01:00
Nikita Mounier
4ecf2a8c24 Modify division behaviour to panic when dividing by 0, and add divChecked, divFloorChecked and divCeilingChecked` for safe alternatives which return a Result, mimicking the previous behaviour. 2022-04-11 11:23:33 +00:00
Folkert
a69bf971f0
Merge remote-tracking branch 'origin/trunk' into update_zig_09 2022-04-06 15:38:15 +02:00
Brian Carroll
4878c701ae Fix Zig builtins for 32-bit targets 2022-03-10 23:26:58 +00:00
Derek Gustafson
b6ad04b0f1
Fix zig fmt error. 2022-03-03 11:14:58 -05:00
Derek Gustafson
6feac21b9b
Remove using a string as an intermediate form in Dec.fromF64. 2022-03-03 11:05:41 -05:00
Folkert
2387dd132a fix problem with formatIntBuf 2021-12-26 14:13:53 +01:00
rvcas
bc5b1abcba feat(Str.toNum): support decimal 2021-12-02 15:35:34 -05:00
Jared Ramirez
1b1d9a7ecf Merge branch 'add-dec-types' of https://github.com/rtfeldman/roc into add-dec-types 2021-07-18 14:13:59 -07:00
Jared Ramirez
a763e046fc Better inline of isDigit 2021-07-18 14:13:12 -07:00
Folkert
4b2804019d add unreachable based on invariants 2021-07-18 22:54:03 +02:00
Folkert
23ea151d5f make decimal math ops correctly report overflow 2021-07-18 22:04:32 +02:00
Folkert
074aba0012 less nullable 2021-07-18 20:00:41 +02:00
Folkert
b0a07558f1 decimal toStr maxInt and minInt tests 2021-07-18 19:52:05 +02:00
Folkert
bc88fc3880 refactor decimal toStr 2021-07-18 19:48:26 +02:00
Jared Ramirez
bb7e0097d1 Use constants; Inline RocDec.isDigit 2021-07-17 17:21:16 -07:00
Folkert
8f3427ce95 simpler to string conversion
more verbose, but does not pull in a whole bunch of zig formatting logic
2021-07-17 16:14:01 +02:00
Jared Ramirez
67eef2c97f Merge branch 'trunk' of https://github.com/rtfeldman/roc into add-dec-types 2021-07-08 16:47:42 -07:00
rvcas
54bcf54f30 chore: dec remove redundant comptime 2021-07-02 18:35:13 -04:00
Jared Ramirez
ecb89da7b8 Add basic Dec operations 2021-06-25 10:25:03 -07:00
Jared Ramirez
0827123c88 Adding Decimals work!! 2021-06-24 11:15:52 -07:00
Jared Ramirez
4d6e5a1a4f [WIP] Add Dec/Decimal builtin types 2021-06-23 19:30:16 -07:00
Jared Ramirez
711daee650 Fix variable names & clarify comments 2021-06-18 12:56:23 -07:00
Jared Ramirez
88aa8318f1 Refactor RocDec.toStr 2021-06-18 12:50:15 -07:00
Jared Ramirez
49977ac803 Fix typo 2021-06-16 14:32:18 -07:00
Jared Ramirez
9903ccecf6 Add RocDec.div 2021-06-16 14:26:09 -07:00
Jared Ramirez
dd2ac10ab9 Add RocDec.sub 2021-06-15 19:19:03 -07:00
Folkert
ff8d26a042 fix typo 2021-06-10 12:20:38 +02:00
Lucas
7f52e46c69
Merge branch 'trunk' into dec-to-string 2021-06-09 18:47:50 -04:00
Richard Feldman
8e19b8ecbb
Merge branch 'trunk' into update_zig 2021-06-07 21:43:31 -04:00
Jared Ramirez
3f4a847bc9 Fix memory leaked test; Add extra edge case tests 2021-06-07 16:50:23 -07:00
Jared Ramirez
e5b2e8965c Simplify failing case 2021-06-07 12:08:18 -07:00
Jared Ramirez
4da87d9a9b Handle negative better 2021-06-07 12:04:36 -07:00
Jared Ramirez
ea893b3481 Rework RocDec.toString internals 2021-06-06 15:38:49 -07:00
Jared Ramirez
060e977cca Rename to/fromString to to/fromStr 2021-06-06 14:46:59 -07:00
Jared Ramirez
a42a2cc1b4 Fix RocDec.toString tests 2021-06-06 14:46:23 -07:00
Jared Ramirez
ac4d718039 Merge branch 'update_zig' of https://github.com/rtfeldman/roc into dec-to-string 2021-06-06 14:28:14 -07:00
rvcas
f6c8c0ff32 feat: better implicit int casts now 2021-06-06 00:51:58 -04:00
rvcas
a3c9009867 fix: all tests need to use try now 2021-06-06 00:50:52 -04:00
Anton-4
314503cf7f fixed typos, added typos checking to CI 2021-06-05 20:02:54 +02:00
Jared Ramirez
c7272766fc Add RocDec.toString 2021-06-04 19:33:38 -07:00
Jared Ramirez
13bb94ac24 fix: last failing test 2021-06-01 17:12:47 -07:00
rvcas
a046bbe32a feat(RocDec): add last few RocStr tests 2021-06-01 20:09:10 -04:00
rvcas
d994b02fe4 Merge branch 'dec-from-string' of github.com:rtfeldman/roc into dec-from-string 2021-06-01 19:56:54 -04:00