Commit graph

296 commits

Author SHA1 Message Date
Artem Yurchenko
97f7c3f609
builtin: move min/max integer values consts from math to builtin (#19809) 2023-11-08 20:43:48 +02:00
Delyan Angelov
9982fa4241
ci: v fmt -w vlib/math/stats/stats.v 2023-10-23 03:30:53 +03:00
Sudoer
65dd69c5d9
math: add missing docstrings for vlib/math functions (#19617) 2023-10-22 22:31:12 +03:00
Delyan Angelov
34cf5221e1
ci: workaround vlib/gg/draw_fns_api_test.v failure with tcc on windows 2023-10-22 18:32:13 +03:00
Sudoer
7e2d737a55
math.unsigned: add missing docstrings for the functions and methods in unint256.v (#19604) 2023-10-20 07:55:14 +03:00
Sudoer
20a1af3abc
math.unsigned: add missing docstrings for the functions in unint128.v (#19597) 2023-10-19 18:09:09 +03:00
shove
69d62e458b
math.big: fix incorrect division with negative numbers (fix #19585) (#19587) 2023-10-18 00:37:37 +03:00
Swastik Baranwal
491b5f7614
math.fractions: use operator overloading and deprecate old functions (#19547) 2023-10-11 03:16:11 +03:00
Sudoer
efef5bcc89
math: add missing docstrings for math.log_gamma_sign and for the complex.complex constructor function (#19523) 2023-10-08 12:20:48 +03:00
Alexander Medvednikov
e265e99a64 all: int => i64 (part 5) 2023-10-08 01:32:37 +03:00
Sudoer
5c37c312b0
builtin,math: add more missing doc strings for public functions (#19509) 2023-10-05 00:35:37 +03:00
Redstoyn33
4b03d08457
math.fractions: make the Fraction struct public (#19507) 2023-10-04 18:16:08 +03:00
Sudoer
db0808c6c9
math: fix documentation for math.radians, math.degrees and math.aprox_cos (#19504) 2023-10-04 12:19:00 +03:00
yuyi
55ca8d8d8e
fmt: align the custom values of the enum fields (#19331) 2023-09-12 14:44:38 +03:00
Leo Developer
43ccba3713
math: fix pure v math.pow (#19287) 2023-09-06 21:41:15 +03:00
Delyan Angelov
3e93a13ed8
math: fix failing test on FreeBSD with gcc 12.2.0 (and -ffast-math) (#19278) 2023-09-06 07:30:46 +03:00
Delyan Angelov
dee8fb99c5 math: log more diagnostic information for the failing test_pow test in math_test.v 2023-09-05 12:38:28 +03:00
Kim Shrier
c126450201
math: fix expected results for -5 raised to the -2 power, add a few more cases (#19274) 2023-09-05 08:13:29 +03:00
Delyan Angelov
fb0f12f937
math: add more C. fn overrides, for the default C backend (speed up examples/path_tracing.v) (#19271) 2023-09-04 21:09:01 +03:00
Leo Developer
a3fa575cf6
math: speedup the pure V math.pow implementation for non-fractional powers (#19270) 2023-09-04 18:37:29 +03:00
yuyi
18e60e77de
fmt: remove inline comments (#19263) 2023-09-03 23:51:56 +03:00
Delyan Angelov
c9e46d34aa
math.big: fix notice for compilation with latest v 2023-08-23 08:10:55 +03:00
Delyan Angelov
679cbf1490
math.big: restore gdc_euclid, use it for smaller numbers, fix bench_euclid.v . 2023-08-14 18:37:48 +03:00
blackshirt
ef5c3cdb73
math.unsigned: change uint256_from_dec_str to return a result, instead of an option (#19041) 2023-08-03 10:18:21 +03:00
Delyan Angelov
41f99c1abf
tools: add cmd/tools/show_ancient_deprecations.v, to cleanup ancient functionality, deprecated over an year ago (#18946) 2023-07-22 19:13:58 +03:00
phoebe
dcbc9e0b9b
math.big: add isqrt_checked and standardize error format (#18939) 2023-07-22 09:20:45 +03:00
phoebe
7b306e9b8f
math.big: add checked division methods (#18924) 2023-07-21 20:06:54 +03:00
phoebe
93b3f1ca55
math.big: make is_odd public and add test cases (#18916) 2023-07-20 13:52:50 +03:00
phoebe
ef1f5d7725
math.big: allow bitwise ops on negative signum (#18912) 2023-07-20 13:52:28 +03:00
phoebe
f9906f3a9e
math.big: fix inner deprecated binary_str use (#18911) 2023-07-20 13:51:58 +03:00
phoebe
4daddd3e84
math.big: improve is_power_of_2 (#18914) 2023-07-20 13:51:26 +03:00
phoebe
6fef2c2ae8
math.big: add test cases for is_power_of_2 (#18910) 2023-07-20 02:34:31 +03:00
phoebe
a49b8f28b1
math.big: rework function naming and documentation (#18890) 2023-07-20 02:33:07 +03:00
Artem Yurchenko
1ed0cd9a74
builtin: reduce the number of array allocations for consts in all V programs (#18889) 2023-07-19 13:06:41 +03:00
Michael Charlton
8a0cca2255
math: correct documentation error for math.signi, make it match the fn signature (#18872) 2023-07-18 17:25:47 +03:00
phoebe
735654296c
math.big: refactor big_test.v for scalability (#18696) 2023-06-28 13:35:13 +03:00
phoebe
1bae9e4538
math.big: minor gcd improvements/fixups and internal rsh_to_set_bit (#18569) 2023-06-27 20:09:22 +03:00
phoebe
4485f1ca1e
math.big: fix documentation for mod_inverse (#18494) 2023-06-20 14:31:04 +03:00
phoebe
a3f24caffc
math.big: add mod_inverse and improve big_mod_pow to allow for large exponents and moduli (#18461) 2023-06-19 17:59:49 +03:00
phoebe
37386697a3
math.big: fix internal subtract_align_last_byte_in_place overflow (#18413) 2023-06-12 13:33:53 +03:00
lemon
e300fb428a
math: add maxof[T]() and minof[T]() (#17905) 2023-04-07 15:48:37 +03:00
yuyi
467a1b4435
fmt: remove redundant parenthesis in the complex infix expr (#17873) 2023-04-04 13:47:48 +03:00
Alexander Medvednikov
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
Subhomoy Haldar
8759409a69
math.big: fix min i32 value bug (#17775)
* attempt big int min value fix

* cast value for correct comparison

* update edge case

* add one more test
2023-03-26 08:45:42 +03:00
yuyi
b42a3f43a5
crypto, math: change option to result (#17580) 2023-03-10 10:31:05 +02:00
Ikko Eltociear Ashimine
2382549df3
math: fix typo in factorial.v (#17322) 2023-02-15 19:57:37 +02:00
John
4098612a87
rand: add full precision f32 and f64 random functions; fix f32/f64 multipliers (#16875) 2023-01-19 15:21:47 +02:00
Felipe Pena
6a179a2926
checker: add int signedness mismatch checking for function call arguments (#16750) 2022-12-24 06:28:35 +02:00
Larpon
7e4dc24f1b
math: add math.vec module with generic 2D, 3D and 4D vector operations (#16710) 2022-12-19 18:10:48 +02:00
Delyan Angelov
675a1be975
math: remove the deprecated math.mathutil module too 2022-11-29 14:56:40 +02:00