Commit graph

29 commits

Author SHA1 Message Date
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
ayazhafiz
13067f2908 Implement Num.toNNNChecked
Closes #2411
2022-02-19 16:20:21 -05:00
rvcas
d8a3a961bf fix: remove first arg input: T from parseFloat in zig 2021-12-02 15:15:14 -05:00
Folkert
d6ed2147ae basic working test case 2021-12-02 20:30:58 +01:00
rvcas
d6ab0b6aa4 fix: bitcode functions needed the str namespace not num 2021-12-01 16:40:56 -05:00
Folkert
69fc1ad7e7 sketch of StrToNum 2021-12-01 15:33:16 +01:00
Folkert
63b1aaad4e hook up polymorphic zig builtins 2021-10-20 16:43:39 +02:00
Folkert
bd98ac6dc7 Merge remote-tracking branch 'origin/trunk' into divTruncate 2021-10-19 23:36:03 +02:00
Folkert
78c49d3095 support intrinsics/builtins for more integer types 2021-10-19 21:41:38 +02:00
Folkert
6cc8f8624c a way forward 2021-10-18 11:09:38 +02:00
Folkert
4152519bfb formatting & catch zig overflow error 2021-10-17 18:03:40 +02:00
Chelsea Troy
0cc6e44d35
Thread through the divCeil implementation from Zig:
+ OPEN QUESTION: Evidently the Zig implementation can throw an overflow error. Do we want to do something in Roc to fix this?
2021-10-17 10:46:16 -05:00
Joshua Hoeflich
b57ebb6229 Remove castToNat 2021-08-19 16:11:21 -05:00
Joshua Hoeflich
2672c8ed10 NumBytesToU16 and NumBytesToU32 tested 2021-08-18 17:39:59 -05:00
Joshua Hoeflich
92da003fba Adds castToNat 2021-08-18 11:02:20 -05:00
Joshua Hoeflich
7068da7144 Merge trunk 2021-08-17 08:47:40 -05:00
Joshua Hoeflich
1c6ac84f2f Add Num.round to dev backend 2021-08-15 17:50:07 -05:00
Joshua Hoeflich
22e781259d TODO: Actually implement the functions 2021-08-14 19:28:13 -05:00
Joshua Hoeflich
9dad304e95 Passing arguments successfully to bytesToU16 2021-08-14 19:11:27 -05:00
Joshua Hoeflich
8022e3e5f4 Rename var 2021-08-14 18:52:48 -05:00
Joshua Hoeflich
5115a004ed Type shenanigans work 2021-08-14 18:50:55 -05:00
Joshua Hoeflich
c8f6762deb Switch from floats to usize 2021-08-14 18:30:43 -05:00
Joshua Hoeflich
d976f2fc93 Inlining zig side 2021-08-14 18:26:46 -05:00
Joshua Hoeflich
744fefc3a1 Fixed: Actually calling llvm we generate 2021-08-14 18:20:11 -05:00
Joshua Hoeflich
ce8f947522 Split sig into two separate functions 2021-08-14 18:08:36 -05:00
Joshua Hoeflich
ff2c3d7945 Dummy implementation that doesn't do what we want 2021-08-14 17:59:53 -05:00
Jared Ramirez
2159d94b87 Zig fmt 2021-02-14 19:00:56 -08:00
Jared Ramirez
d7ba522155 Inline all num functions 2021-02-07 20:01:45 -08:00
Jared Ramirez
e112a406a2 Fix countGrapheme wiring; Reorganize zig builtins; Streamline how we export zig function 2020-11-06 16:54:28 -06:00