Commit graph

351 commits

Author SHA1 Message Date
Delyan Angelov
4877417adf
math.big: make ./v -prod -cstrict -cc gcc-11 test vlib/math/ pass cleanly (workaround a problem in V's cgen, that -cstrict discovered) 2025-03-08 13:45:31 +02:00
Delyan Angelov
e66e9960d3
math: fix ./v -prod -cstrict -cc gcc-11 vlib/math/math_bench_test.v (use unions to implement f64_bits/1 and f64_from_bits/1 for compilers != tcc) 2025-03-08 12:28:25 +02:00
Delyan Angelov
cec123a0df
math,examples: add examples/sokol/sounds/simple_sin_tone_using_audio_push.v, cleanup math 2025-03-04 12:19:27 +02:00
Delyan Angelov
9b8a1607ed
math.big: add vlib/math/big/big_division_test.v (follow-up to 270941a) 2025-02-26 05:25:51 +02:00
Delyan Angelov
270941a6bd
math.big: bump newton_division_limit to 1_000_000 (workaround issue #23806) 2025-02-26 04:54:01 +02:00
larpon
4f98fe982c
math.vec: add rotate_around_* (cw/ccw) functions to vec.Vec2[T] (#23807) 2025-02-26 03:46:18 +02:00
Delyan Angelov
6d017f3a31
math.big: fix 1/115792089237316195423570985008687907853269984665640564039457584007908834671663 leading to panic (fix #23771) 2025-02-20 18:19:55 +02:00
Delyan Angelov
2b479b5eb0
math: cleanup floor.v, remove the last goto in the math module 2025-02-06 09:29:21 +02:00
Delyan Angelov
d1ec41cd6a
math: cleanup gamma.v: remove if true { and gotos; move constants closer to the places that do use them 2025-02-06 09:22:45 +02:00
Emma
6b92f8fada
all: remove ancient deprecations (#23479) 2025-01-16 16:36:12 +02:00
Felipe Pena
f83ea1bbaa
type_resolver: fix generic selector field type resolving (continuation of #23456) (#23473) 2025-01-15 09:02:46 +02:00
Delyan Angelov
e983d75b64
markused,builtin,strconv,vlib: reduce generated C sizes for compilers != tcc, for short programs, by simplifying the generation of backtraces, and reducing string interpolations in panics (#23380) 2025-01-06 08:23:56 +02:00
Felipe Pena
3ed799ef7b
checker: fix comptime evaluation on infix expr (fix #23341) (#23344) 2025-01-04 01:13:33 +02:00
Delyan Angelov
7eec8b1cd7
math,examples: make 2048 use sliding animation for the tile movement (#23268) 2024-12-26 06:39:59 +02:00
Delyan Angelov
e6c1637d32
math: add math.easing module, ported from the functions, described in https://nicmulvaney.com/easing and https://easings.net/ (#23251) 2024-12-24 00:46:46 +02:00
kbkpbot
47c0ca8ab3
math.stats: support int/i64 arrays, fix tests (fix #23245) (#23249) 2024-12-23 16:41:02 +02:00
Delyan Angelov
f048bb373b
ci: fix for -cc tcc -no-retry-compilation, do not use more complex constants, but functions in vlib/math/vec/vec2_test.v 2024-12-13 19:50:55 +02:00
Delyan Angelov
73476c04d4
math.vec: add Vec2[T].angle_towards + tests for it 2024-12-13 18:57:27 +02:00
Delyan Angelov
25905df56e
math.vec: cleanup angle_between implementation, add more tests 2024-12-13 16:06:05 +02:00
Delyan Angelov
f581bb7d62
math.vec: fix Vec2.angle_between/1; add tests 2024-12-13 15:45:52 +02:00
kbkpbot
d95dac4a01
math: fix math.log10() for -exclude @vlib/math/*.c.v (fix #23136) (#23140) 2024-12-12 23:43:04 +02:00
Delyan Angelov
fdfb3896e9
math: use libc wrappers for math.log2/1, math.log10/1, math.log1p/1 and math.log_b/1; make assert math.log10(10) == 1.0 pass in the common case (#23129) 2024-12-11 12:06:33 +02:00
Delyan Angelov
ef7fdd0f84
math.big: fix assert big.integer_from_int(1) == big.integer_from_bytes([u8(0), 0, 0, 0, 1]) (fix #23115) (#23124) 2024-12-10 18:18:30 +02:00
Delyan Angelov
81129d197b
math.big: use @[manualfree] to workaround -autofree compilation issues with gitly, and other projects using crypto.rand and math.big 2024-11-21 22:06:49 +02:00
Delyan Angelov
5bba92a65a
vlib: remove modules/functions/fields, deprecated in 2023 (#22750) 2024-11-17 20:09:21 +02:00
kbkpbot
0224581bc6
math.big: improve the performance of left_shift_digits_in_place and right_shift_digits_in_place (#22450) 2024-10-08 21:48:26 +03:00
Delyan Angelov
6ba87b948a
math.big: fix a + b and a - b, when the signs are different, add more test cases (#22330) 2024-09-27 17:13:39 +03:00
Alexander Medvednikov
03e0b9e646 math: document q_rsqrt 2024-09-24 04:33:46 +03:00
yuyi
008aaad999
fmt: remove the prefixed module name of const names, that are in the same module (related #22183) (#22185) 2024-09-10 11:25:56 +03:00
Alexander Medvednikov
0090170b26 all: implements keyword for optional explicit interface implementations 2024-09-04 01:24:06 +03:00
Swastik Baranwal
4b799fd81d
checker: disallow using a preexisting const name in a for loop, as either a key or value ident (#22108) 2024-08-24 02:16:28 +03:00
yuyi
c51d30bf53
fmt: fix alignment of struct init fields (#22025) 2024-08-11 09:11:24 +03:00
yuyi
19f080ffb8
all: change single blank comment to blank line (#22016) 2024-08-09 14:55:58 +03:00
Delyan Angelov
d9a3a3aa0a
strconv,math.bits: eliminate bounds checking in commonly used routines 2024-07-22 13:43:50 +03:00
Delyan Angelov
b6c7b46dcf
math: avoid unused calculations for math.modulo_floored/2 and math.modulo_euclid/2 2024-06-29 11:33:46 +03:00
Delyan Angelov
3799d7f635
math: add divide_truncated/2, divide_euclid/2, divide_floored/2 and modulo_truncated/2, modulo_euclid/2, modulo_floored/2 (#21759) 2024-06-29 11:24:49 +03:00
Kim Shrier
5fbf676803
math.unsigned: fix some Uint256 bugs and add tests (#21528) 2024-05-19 16:51:01 +03:00
Ikko Eltociear Ashimine
328e53bff3
math.big: fix typo tranform -> transform in special_array_ops.v (#21475) 2024-05-08 18:10:21 +03:00
Kim Shrier
f71b801707
math.unsigned: permit _ separators in Uint128 decimal strings passed to uint128_from_dec_str (#21461) 2024-05-08 13:05:49 +03:00
Turiiya
1a35a783f1
breaking,checker: disallow initializing private struct fields outside structs module (#21183) 2024-04-12 13:53:02 +03:00
Delyan Angelov
4dcc9265e1
examples: add pidigits.v; optimise math.big's Integer divide a bit (#21239) 2024-04-09 17:01:05 +03:00
Ikko Eltociear Ashimine
0fd67b225c
math: fix occuring -> occurring typo in stats.v (#21227) 2024-04-08 18:39:01 +03:00
Turiiya
9704a01406
parser: fix case of falsely registering imports as used, remove unused imports (#21156) 2024-04-01 19:46:50 +03:00
cui fliter
78602846e5
all: fix typos in comments (#20963) 2024-03-04 18:41:55 +02:00
Turiiya
d485cceee8
doc: update trim_doc_node_description, make module readmes more uniform (#20792) 2024-02-12 12:38:47 +02:00
Pierre Curto
900ec70711
checker: add cast overflow checks (#20641) 2024-01-24 18:36:39 +02:00
Delyan Angelov
856984aa14
cleanup: turn .microseconds() ... us to .microseconds() ... µs (#20588) 2024-01-20 07:16:24 +02:00
shove
072d65b28a
checker: fix @[deprecated] attribute for consts (fix #20523) (#20550) 2024-01-16 08:00:47 +02:00
Anton
763f94388b
all: update copyright year (#20334) 2024-01-01 23:29:54 +02:00
Sudoer
34858c3265
ast, math.complex: add missing docstrings for the methods in types.v (#20281) 2023-12-27 21:18:46 +02:00