Folkert
8c4b574e48
remove type def for maxFloat; could only be used by expr2, and it isn't so this is safe
2022-05-09 22:56:09 +02:00
Mfon Eti-mfon
9068c2414e
Rename float functions and vars
2022-05-08 18:42:12 +01:00
Richard Feldman
85e7969c2d
Replace references to "global tag" with "tag"
2022-04-25 17:04:34 -04:00
Richard Feldman
082fde976a
Merge branch 'trunk' into sqrt-unchecked
2022-04-20 08:19:34 -04:00
Richard Feldman
93677001ba
Merge pull request #2888 from rtfeldman/divTrunc
...
rename divFloor to divTrunc
2022-04-19 21:57:49 -04:00
Kevin Gillette
d236c28743
Merge branch 'trunk' into sqrt-unchecked
2022-04-18 19:12:22 -06:00
Kevin Gillette
9ed4ca9739
remove Num.mod and Num.modUnchecked
2022-04-18 13:54:40 -06:00
Kevin Gillette
6a3fd3a607
rename divFloor to divTrunc
2022-04-18 02:33:31 -06:00
Kevin Gillette
1908ff41c3
rem, sqrt, log are unchecked but have checked variants
...
mod exists but is not implemented due to lack of hardware support
(emulation, possibly in terms of rem, is needed).
2022-04-17 14:40:39 -06:00
Folkert
e112f6ad2c
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-16 21:01:51 +02:00
Folkert
2b07b8c78d
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-13 21:45:40 +02:00
Kevin Gillette
2c4a83788c
Rename internal NUM_DIV_INT references to NUM_DIV_FLOOR.
...
This balances with NUM_DIV_CEIL
(which is another form of integer division).
2022-04-13 02:48:57 -06:00
Richard Feldman
d81228df80
cargo fmt
2022-04-11 13:17:46 -04:00
Nikita Mounier
8206f345c7
Merge remote-tracking branch 'origin/trunk' into div-no-result
2022-04-11 11:45:06 +00: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
1d0f9e9192
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-08 15:47:11 +02:00
Richard Feldman
cd00a98636
Add toF32/64 and checked versions
2022-04-07 16:13:57 -04:00
Folkert
4e1197165b
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc-delayed-alias
2022-03-18 21:25:52 +01:00
Folkert
e3e9215578
Merge remote-tracking branch 'origin/trunk' into type-checking-storage-subs
2022-03-12 14:10:43 +01:00
Folkert
28ce49c273
use lazy_static
2022-03-12 00:18:06 +01:00
Folkert
5006b2afa3
playing with atomics to get the global stdlib to work
2022-03-11 23:39:55 +01:00
Folkert
11da96b286
make borrow_stdlib threadsafe
2022-03-11 22:49:29 +01:00
Brendan Hansknecht
d681062c63
add Num.toNat
2022-03-11 11:17:42 -08:00
Folkert
3510bad1d5
add scaffolding
2022-03-07 20:55:40 +01:00
Folkert
adf4ad22a5
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-03-05 20:55:15 +01:00
Folkert
db6b5bfd38
get Num to fully work again
2022-02-28 19:40:18 +01:00
Brendan Hansknecht
2ca1ebdd2d
appease the paperclip
2022-02-27 15:50:19 -08:00
Folkert
78fe734113
change the return type of List.replace
2022-02-27 22:47:08 +01:00
Folkert
db1669154e
WIP
2022-02-27 21:53:56 +01:00
Brendan Hansknecht
dddf8ff785
switch from pair to record and change name to ListReplaceUnsafe
2022-02-24 20:41:26 -08:00
Brendan Hansknecht
ba2e8cd32b
Add base piping for list.Replace
2022-02-24 17:58:56 -08:00
ayazhafiz
aa8b6e3393
Clippy
2022-02-19 16:28:36 -05:00
Jan Van Bruggen
e12d98af98
WIP: Start adding new Int.toInt builtins
2022-02-19 11:28:12 -05:00
Jan Van Bruggen
f47dbb5171
Swap List.mapWithIndex arg1 args order to put the element first
2022-02-11 16:10:29 -07:00
Jan Van Bruggen
92e0f8714f
Swap List.repeat args order to put the list first
2022-02-11 16:10:29 -07:00
Jan Van Bruggen
9a8a4c6ed7
Add Num.(min/max)(I/U)(8/16)
builtins
2022-01-22 00:19:17 -07:00
Eric Newbury
a96d5e6abf
Merge branch 'trunk' into enewbury/list-sort-desc
2022-01-21 17:06:52 -05:00
Eric Newbury
7e7104d9ba
WIP
2022-01-21 16:46:47 -05:00
Eric Newbury
05c01a81f5
adding List.sortAsc builtin
2022-01-21 15:34:24 -05:00
Jan Van Bruggen
8e4b6f0cab
Remove Num.(min/max)Int
...
Replace all uses with `Num.(min/max)I64`,
since all uses expect an `I64`.
2022-01-19 09:55:06 -07:00
Jan Van Bruggen
591477e77b
Add most remaining Num.min/max*
builtins
...
This skips `min/maxU128`, as they require a subtle change
to the `I128`-centric implementation of `Int`s.
2022-01-17 15:26:23 -07:00
Jan Van Bruggen
d7e2be306f
WIP: Add Num.minI128
builtin (TODOs remain)
2022-01-15 17:49:15 -07:00
ayazhafiz
2c41c43aea
Implement saturated add/subtract
2022-01-10 22:37:08 -05:00
ayazhafiz
ed64ff912a
Implement List.dropIf
...
This was referenced in the `List` documentation and in the
[tutorial](./TUTORIAL.md), but wasn't actually implemented prior to this
commit!
Part of #2227
2021-12-22 12:34:48 -06:00
rvcas
b7d48b2fe1
feat: add the rest of the num types for Str conversion
2021-12-06 23:24:02 -05:00
rvcas
e587e20de2
feat: switch to using a builtin per num type to convert from a string
2021-12-06 22:24:00 -05:00
rvcas
ba9d01773b
fix: result holds a num_type
2021-12-01 16:25:00 -05:00
rvcas
3104406956
feat: add the type def for Str.toNum
2021-12-01 16:12:55 -05:00
Anton-4
e63701c5d1
trying to make Str.toNum work for Ints
2021-12-01 20:37:21 +01:00
Anton-4
eaf4e57759
started on Str.toNum
2021-12-01 15:15:30 +01:00