Commit Graph

84 Commits

Author SHA1 Message Date
Jeroen van Rijn
ddedddc16d Get rid of duplicate math.signbit in favor of math.sign_bit 2025-04-15 16:17:02 +02:00
Barinzaya
bffa0eaa58 Fixed math.nextafter procs skipping from 0 to 1. 2025-04-07 13:38:10 -04:00
Evan Martinez
36481f6d4a Fix binomial function 2024-11-28 00:28:26 -07:00
Jeroen van Rijn
beb10cce63 Fix #4227 2024-09-10 15:31:57 +02:00
Jeroen van Rijn
dd1f151696 Add math.remap_clamped. 2024-09-01 17:22:58 +02:00
Karl Zylinski
6e150d1d58 Make math.remap clamp the result in range [new_min, new_max]. 2024-09-01 16:30:48 +02:00
Feoramund
2906f2aa7e Add core:math.count_digits_of_base 2024-08-18 20:14:14 -04:00
gingerBill
3a9b86628a Add @(rodata) and @(static, rodata) where appropriate 2024-06-06 15:23:52 +01:00
alec hodgkinson
4cdadeedc3 Added docs for trig function procedure groups 2024-04-11 09:55:43 -07:00
Juan Ignacio Díaz
cd61251d39 add Go license 2024-02-17 11:49:07 -03:00
Juan Ignacio Díaz
7a592cbb31 port math.round from Golang 2024-02-16 13:23:44 -03:00
gingerBill
3e7e779abf Replace core:* to base:* where appropriate 2024-01-28 22:18:51 +00:00
Jeroen van Rijn
9ea88f1353 Merge pull request #2918 from flysand7/math-doc
[math]: Fix the doc comments on `F64_*` constants
2023-11-24 14:16:19 +01:00
Jeroen van Rijn
dd9b0ae4e5 Make pow2_f{16,32,64} contextless for consistency. 2023-11-11 14:06:48 +01:00
Jeroen van Rijn
4cb0edc90b Work around LLVM idiocy. 2023-11-04 22:42:32 +01:00
Jeroen van Rijn
6201280468 Add math.pow2_f{16,32,64}, fast floating point 2^x where x is an integer. 2023-11-04 22:14:44 +01:00
flysand7
4a4aca6829 [math]: Fix the doc comments on F64_* constants 2023-11-04 20:30:14 +11:00
gingerBill
5dba08fb3b Keep -vet happy 2023-07-31 12:19:25 +01:00
gingerBill
866a9fdf19 Actually add math.hypot 2023-06-28 12:19:45 +01:00
gingerBill
20e954a864 Add math.hypot 2023-06-28 12:16:49 +01:00
gingerBill
82023cd629 Add @(require_results) to core:math procedures 2023-05-22 11:58:01 +01:00
gingerBill
2127dc56b1 Add math.pow10 2022-11-29 14:31:56 +00:00
gingerBill
0c25f7cdc5 Improve core:math procedures and add loads of unit tests 2022-11-29 11:39:44 +00:00
gingerBill
e5c243ee93 Fix atan2 by swapping the arguments internally 2022-11-29 09:19:45 +00:00
gingerBill
92e406cef0 Implement asin in native Odin 2022-11-04 14:30:18 +00:00
gingerBill
269913ede0 Implement acos in native Odin 2022-11-04 14:26:31 +00:00
gingerBill
ff36b754cb Fix atrig functions 2022-11-04 13:53:28 +00:00
gingerBill
39728b8bfb Add the builtin procedures abs, clamp min, max to core:math as aliases 2022-09-08 15:08:53 +01:00
gingerBill
208f168564 Correct assignment 2022-08-15 16:31:59 +01:00
gingerBill
737bccbd5e Add math.divmod and math.floor_divmod 2022-08-15 16:31:43 +01:00
blake
b2b0043875 fixed math.log2 2022-08-06 06:19:47 -04:00
Yeongju Kang
4e8bc0786d fix parameter for atan2 in procedure asin 2022-07-22 15:48:06 +09:00
Stanislav Ch. Nikolov
5e04ddd653 Fix #1627: Remove wrong return type in cumsum_inplace 2022-03-17 04:20:39 +02:00
gitlost
b94a7a87fa Fix issue #1574 "fract in linalg/glm is broken" by fixing
trunc_f16/32/64 in "math.odin" (~ typos on expressions)
Fix classify_f16 Inf test (would fail for subnormal 0h0001)
  by changing multiplier 0.5 -> 0.25
Add some useful consts to "math.odin" (INF_F16 etc)
Add comment to "demo.odin" mentioning that -0.0 must be used
  to specify negative zero
2022-03-08 18:06:25 +00:00
gilles
4ebdb6740e fix math.prod
accumulator was not initialized to one
2021-12-16 18:55:51 +01:00
gingerBill
f40f12d480 Minor cleanup to math constants 2021-11-21 14:06:32 +00:00
gingerBill
2b546a598c Add math.signbit; Add math.gamma based on http://netlib.sandia.gov/cephes/cprob/gamma.c 2021-11-16 15:23:19 +00:00
gingerBill
b530ca9a5e Add math.nextafter 2021-11-16 15:12:01 +00:00
gingerBill
e721f26a76 Implement ln based off FreeBSD's /usr/src/lib/msun/src/e_log.c 2021-11-16 15:05:04 +00:00
gingerBill
91408cb21f Implement atanh based on FreeBSD's /usr/src/lib/msun/src/e_atanh.c 2021-11-16 14:58:59 +00:00
gingerBill
eb8b0d7a03 Add log1p, erf, erfc, ilogb logb (implemented based of FreeBSD's) 2021-11-16 14:54:57 +00:00
gingerBill
6a101e69a2 Implement ldexp and frexp in native Odin 2021-11-16 14:04:49 +00:00
gingerBill
518460af66 Begin work in semi-standardized js_wasm32 target 2021-11-07 19:56:01 +00:00
gingerBill
7bb7a741c6 Make math procedure contextless; Add asinh, acosh, atanh 2021-11-04 14:07:05 +00:00
gingerBill
720884e0f1 Strip even more semicolons if followed by a } or ) on the same line 2021-08-31 23:47:57 +01:00
gingerBill
251da264ed Remove unneeded semicolons from the core library 2021-08-31 22:21:13 +01:00
gingerBill
f0437a4242 Enforce core:builtin and core:intrinsics for imports 2021-08-21 13:44:16 +01:00
Joakim Hentula
6465fb8ec7 Fix for value rather than type used for intrinsics 2021-05-31 13:21:13 +01:00
Jeroen van Rijn
d7dba495fd Last of the Endian float in math.odin. 2021-05-29 18:27:43 +02:00
Jeroen van Rijn
c05f6b4a31 Even more Endian maths. 2021-05-29 17:52:47 +02:00