Commit graph

397 commits

Author SHA1 Message Date
Mike
5a87e8cf20
math.big: fix integer_from_int(min_int) edge case, add tests (#25120) 2025-08-17 01:45:47 +03:00
kbkpbot
a1b131c99a
math.big: move from u32 to u60 digits (#25018)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
2025-08-14 09:59:35 +03:00
Delyan Angelov
21afd13d50
math: fix doc comment examples 2025-08-13 18:00:18 +03:00
kbkpbot
350747793b
math.bits: add asm implementations for some 64 bit ops (#25020) 2025-08-11 09:01:49 +03:00
Larsimusrex
809e617501
decoder2: support custom decoders (#25021)
Some checks failed
json decoder benchmark CI / json-encode-benchmark (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
json encoder benchmark CI / json-encode-benchmark (push) Has been cancelled
2025-08-02 14:07:29 +03:00
Delyan Angelov
ace5df7236
ci: workaround -usecache issue afte 2d87ac4 2025-07-27 20:24:13 +03:00
Delyan Angelov
66946738fb
tests: fix some of the notices/warnings/errors discovered through find . |grep _test.v$ |xargs -i ./v -g -keepc -skip-running {} 2025-07-24 07:38:03 +03:00
Delyan Angelov
43a4f3fa76
math.big: fix validate_string and integer_from_regular_string (check for characters.len > 0, before accessing characters[0])
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-07-23 15:04:55 +03:00
Mike
8578fd477a
math.big: fix zero base in big_mod_pow(), add tests (#24940) 2025-07-21 17:07:38 +03:00
Mike
080b56f0a9
math.big: fix big_mod_pow() (#24939) 2025-07-21 08:46:00 +03:00
Mike
46d4a6f8af
math.big: add shrink zeros to karatsuba and toom-cook (#24937) 2025-07-20 20:47:17 +03:00
Mike
987c211517
math.big: fix the order of calculations in mod_pow() to improve performance (#24935) 2025-07-20 15:27:20 +03:00
Mike
f06def7d6d
math.big: fix toom-cook 3-way multiplication (#24888) 2025-07-13 18:36:46 +03:00
Mike
ee6eed3c22
math.unsigned: replace untested comments for uint256 public APIs (#24873) 2025-07-10 10:36:52 +03:00
Mike
03e72a4856
math.unsigned: fix rotate_left() for uint256, add test (#24872) 2025-07-10 08:45:34 +03:00
Mike
e850f6c678
math.unsigned: fix div_128() for uint128, add tests (#24869) 2025-07-09 23:33:50 +03:00
Mike
499283edc8
math.unsigned: fix lsh() for uint256, add tests (#24867) 2025-07-08 20:10:33 +03:00
Mike
09e1edbd17
math.unsigned: fix rsh() for uint256 too, add tests (#24865) 2025-07-08 17:22:45 +03:00
Mike
47145ea644
math.unsigned: fix typos for uint128 (#24863) 2025-07-08 10:24:45 +03:00
Mike
e62ed47812
math.unsigned: fix quo_rem(), add tests (#24859) 2025-07-07 16:27:26 +03:00
Mike
3b791be3aa
math.unsigned: fix rsh() for Uint128, add tests (#24841) 2025-07-03 13:51:48 +03:00
Mike
2a5398aff6
math.unsigned: fix lsh() for Uint128, add tests (#24840) 2025-07-03 12:44:31 +03:00
Mike
c989f9bb78
math.unsigned: add uint256_new() function and tests (#24837) 2025-07-02 22:30:59 +03:00
Laurent Cheylus
aadb0e9435
maths.bits: fix ambiguous expressions, remove special case in the checker (#24815) 2025-06-30 22:02:24 +03:00
Mike
502f0e7e77
math.big: remove unnecessary code from / and % (the same is done in div_mod, which they call) (#24766) 2025-06-21 06:31:59 +03:00
Mike
25264e0fbe
math.big: remove minus from zero result in right_shift(), add tests (#24767) 2025-06-21 06:29:46 +03:00
Mike
5a81d8a509
math.big: add mod_euclid() and mod_euclid_checked, similar to libgmp's mpz_mod(), add tests (#24764) 2025-06-20 19:22:20 +03:00
Mike
6e271b2ae6
math.big: change the handling of negatives in div_mod() to match gmp and Julia, add tests (#24713) 2025-06-15 10:51:40 +03:00
Mike
e8fe334396
math.big: speed up ~10x integer_from_radix() (#24674) 2025-06-09 11:13:07 +03:00
Mike
cecbc7294a
math.big: improve the performance of radix_str() ~9 times (#24666) 2025-06-08 13:02:33 +03:00
Mike
366f3d6b98
math.big: add test for radix_str() and integer_from_radix() (#24644) 2025-06-02 22:20:57 +03:00
Mike
b19fa76c6e
math.big: make is_power_of_2() be false for negatives (it now matches Julia's ispow2/1) (#24619) 2025-05-31 08:11:16 +03:00
Mike
0d00eb712c
math.big: remove unnecessary casting from Integer.is_power_of_2/0 (#24614) 2025-05-30 14:15:39 +03:00
Delyan Angelov
3ecffe68ff
math.big, docs: document the behaviour of % for negative numbers; in V: -10 % 7 == -3 (#24604) 2025-05-30 05:49:19 +03:00
Mike
ca379439fb
math.big: rewrite subtract_in_place() to fix Karatsuba, add tests (#24563) 2025-05-25 13:14:08 +03:00
Mike
f19e8a7fa3
math.big: optimize divide_array_by_digit() (#24566) 2025-05-25 13:06:27 +03:00
larpon
90445259d3
math: add exp_decay to interpolation.v (#24545) 2025-05-21 21:30:40 +03:00
Mike
c27bc602bd
math.big: fix Karatsuba's add_in_place() function, add carry handler on exit (#24541) 2025-05-21 13:54:21 +03:00
Mike
341008687d
math.big: add missing assert for test_multiply_karatsuba_02 (#24534) 2025-05-21 06:06:28 +03:00
Mike
029564bab1
math.big: respect the sign of the dividend in % operator, add test (#24489) 2025-05-15 13:17:36 +03:00
Mike
65767d23d8
math.big: fix the + operator for big.Integer for negative numbers, add test (#24487) 2025-05-14 20:13:02 +03:00
Mike
861adfcc65
math.big: add new .bitwise_com/0 method + tests (#24476) 2025-05-13 23:28:57 +03:00
Delyan Angelov
0321c3f544
Revert "math.bits: port changes from e66e996, so that -cstrict -cc gcc-11 passes for markdown as well"
This reverts commit 41a846a534.
2025-03-13 00:08:57 +02:00
Delyan Angelov
41a846a534
math.bits: port changes from e66e996, so that -cstrict -cc gcc-11 passes for markdown as well 2025-03-12 23:40:01 +02:00
Delyan Angelov
e32283fd1c
math: add remap/5, smoothstep/3 and smootherstep/3 implementations + tests 2025-03-12 08:53:27 +02:00
Delyan Angelov
35b1cff2d3
tools: support // vtest build: !do_not_test ?, // vtest build: !windows && tinyc to skip files during testing on specific platforms, without having to keep centralised skip lists (#23900) 2025-03-11 21:57:47 +02:00
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