Christoffer Lerno
496d23e93f
Fix some @require comments.
2025-06-10 01:54:45 +02:00
Christoffer Lerno
45a0895c39
Fix fmod regression.
2025-06-04 15:25:18 +02:00
Christoffer Lerno
72cc8e430a
-0xFF will now be a signed integer.
...
- `-2147483648`, MIN literals work correctly.
2025-06-04 15:20:49 +02:00
Book-reader
61a4dcc807
add macro wrappers for $$overflow_add, $$overflow_sub, and $$overflow_mul builtins
2025-05-26 20:58:16 +02:00
Christoffer Lerno
6c822e5aa3
Add math::@ceil() compile time ceil function. #2134
2025-05-15 12:46:46 +02:00
Christoffer Lerno
abe4727c3a
Deprecate uXX and iXX bit suffixes.
...
Add experimental LL / ULL suffixes for int128 and uint128 literals.
2025-05-13 23:48:59 +02:00
Christoffer Lerno
0a9bb2e8e0
Fix to simple a += b overload fallback. Renaming and reordering in the stdlib.
2025-04-15 12:01:58 +02:00
Christoffer Lerno
b64dcde21d
Make aliases able to use @deprecated. Prefer math::I and math::I_F for math::IMAGINARY and math::IMAGINARYF the latter is deprecated. Combination of += and [] overloads now properly handled in most cases.
2025-04-14 20:51:01 +02:00
Christoffer Lerno
eade5fa57a
Fix Windows sincos.
2025-04-14 03:36:03 +02:00
Christoffer Lerno
f85198e3ee
Added += and related as overloads. Updated tests and docs. Slice2 extracted to its own file.
2025-04-14 00:55:46 +02:00
Christoffer Lerno
dca805bd8a
Added tests to sincos. Correctly detect multiple overloads of the same type. Fix regression quaternion overload. Remove "1." style.
2025-04-13 15:46:27 +02:00
Christoffer Lerno
3888fcb182
- Add @operator_r and @operator_s attributes.
2025-04-13 13:43:03 +02:00
Christoffer Lerno
0f2d425297
Operator overloading for + - * / % & | ^ << >> ~ == !=
2025-04-11 18:46:22 +02:00
Christoffer Lerno
3cb5df5639
0.7 fixes. Improving the yacc grammar.
2025-04-04 18:14:16 +02:00
Christoffer Lerno
e828d9a05a
Fix stdlib naming.
2025-04-03 01:47:52 +02:00
Christoffer Lerno
586d191585
Fix in stdlib and update readme.
2025-03-30 23:11:29 +02:00
Christoffer Lerno
7e100472e7
- AnyList now also defaults to the temp allocator.
...
- `os::getcwd` and `os::get_home_dir` requires an explicit allocator.
- `file::load_new` and `file::load_path_new` removed.
2025-03-18 18:34:52 +01:00
Christoffer Lerno
425676a98d
Bug due to missing cast when doing $i[$x] = $z.
...
Added `math::iota`.
2025-03-16 10:58:13 +01:00
Christoffer Lerno
5c77c9a754
- Change distinct -> typedef.
...
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00
Christoffer Lerno
8b49e6c14d
Rename def to alias.
2025-03-13 11:22:27 +01:00
Christoffer Lerno
25bccf4883
New faults and syntax ( #2034 )
...
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00
Christoffer Lerno
c0b80eccad
Change @return! syntax to require ":" after faults. Update all contracts to consistently use ":" before the description.
2025-03-05 17:11:45 +01:00
Christoffer Lerno
2439405e70
- $foreach "()" replaced by trailing ":" $foreach ($x, $y : $foo) -> $foreach $x, $y : $foo:
...
- `$for` "()" replaced by trailing ":" `$for (var $x = 0; $x < FOO; $x++)` -> `$for var $x = 0; $x < FOO; $x++:`
- `$switch` "()" replaced by trailing ":" `$switch ($Type)` -> `$switch $Type:`
- Empty `$switch` requires trailing ":" `$switch` -> `$switch:`
2025-03-04 16:13:47 +01:00
Christoffer Lerno
0a905d8458
Change all hash functions to have a common hash function.
2025-03-03 20:07:02 +01:00
Christoffer Lerno
261bfb97c6
Rename length_sq to sq_magnitude
2025-03-03 18:47:55 +01:00
Christoffer Lerno
cc94199131
Remove Vec2 and other aliases from std::math.
2025-03-03 18:13:39 +01:00
Christoffer Lerno
c40198b016
- new_* functions in general moved to version without new_ prefix.
...
- `string::new_from_*` changed to `string::from_*`.
- `String.to_utf16_copy` and related changed to `String.to_utf16`.
- `String.to_utf16_tcopy` and related changed to `String.to_temp_utf16`
- `mem::temp_new` changed to `mem::tnew`.
- `mem::temp_alloc` and related changed to `mem::talloc`.
- `mem::temp_new_array` changed to `mem::temp_array`.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
222bfb158b
Remove deprecated functions.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
2a895ec7be
First 0.7 update, removing all deprecated features.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
33b05bcfeb
More deprecations in lib6, and updates to lib7
2025-02-27 11:10:41 +01:00
Jonas Quinten
ed62268997
std::math::bigint: Fixed init_with_array with empty array
2025-02-24 11:12:55 +01:00
Jonas Quinten
38110b0269
fix
2025-02-24 11:12:55 +01:00
Jonas Quinten
e34d56327a
std::math::bigint: Fixed init_with_u128 and init_with_array
2025-02-24 11:12:55 +01:00
Christoffer Lerno
855be92881
Regression with .gitkeep in project init. List.init incorrectly didn't have the first argument the allocator. Added .init to priority queue. Created mem thread allocator alias. Correctly handle ident aliases. Allow ident on builtin aliases.
2025-02-21 21:34:48 +01:00
Christoffer Lerno
e77d1fb646
- Increase precedence of (Foo) { 1, 2 }
...
- Add `--enable-new-generics` to enable `Foo{int}` generic syntax.
2025-02-18 00:26:22 +01:00
Christoffer Lerno
8c58b31bbd
Remove <[]> experimental generic syntax.
2025-02-13 12:53:46 +01:00
Christoffer Lerno
d3f2180330
bigint::from_int(0) throws assertion #1944 .
2025-02-08 19:15:14 +01:00
Christoffer Lerno
68b5c1e1f1
Fix bigint hex parsing #1945 .
2025-02-08 19:06:06 +01:00
Adversing
f3afec61bb
Added fmodf function #1875
2025-01-31 22:20:45 +01:00
Christoffer Lerno
70d0ad1fcc
Missing error when placing a single statement for-body on a new row #1892 .
2025-01-28 17:13:37 +01:00
Christoffer Lerno
9530fe8fcd
Fix regression for parsing types and switch to the "new" generic syntax that's being tested.
2025-01-26 22:51:27 +01:00
Christoffer Lerno
e40bab2d30
Allow (int[*]) { 1, 2 } cast style initialization. Experimental change from [*] to [?]. Fix issue where compile time declarations in expression list would not be handled properly.
2025-01-25 22:10:12 +01:00
Christoffer Lerno
304b604652
Added weakly linked __powidf2
2025-01-17 17:42:39 +01:00
Taylor W
660654f9e0
math_tests: pow test ( #1842 )
...
* math::nolibc: replaced code with word macros
* math_tests: pow test
Added test for pow and added more test points for the exp and log tests.
2025-01-15 13:35:18 +01:00
Taylor W
259112e178
math: macros to set floating-point numbers with uint ( #1826 )
...
* math: Setting the bits of floating-point numbers
Added macros which set all 32 bits of a float, the lower 32 bits of
a double, and the upper 32 bits of a double. Some changes were made to
older code to use these macros.
* Replaced code with bitsetting macros in __tan.c3 and tan.c3
* math: tests for word macros and release notes
Tests were written for the word macros, which include getting and
setting a float with a uint and getting and setting the high or low word
of a double with a uint.
Release notes were updated to include the word setter macros.
2025-01-13 13:37:49 +01:00
Adversing
2623d7d525
Feat: Added exp, log and pow functions as requested in #1632 ( #1781 )
...
* Feat: Added exp, log and pow functions as requested in #1632
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-01-12 22:50:10 +01:00
Christoffer Lerno
dad97fc2d9
Improved #foo resolution inside of the compiler.
...
Deprecation of several `&` macros.
2025-01-08 12:55:20 +01:00
Taylor W
53bada2a1e
math::nolibc: atanh ( #1730 )
...
* math::nolibc: log1p
* math::no_libc: atanh
Added atanh nolibc definition and more test points in the math_tests
module.
2024-12-28 21:13:44 +01:00
Taylor Wampler
1042d0825f
Fixed typo in atan.c3
2024-12-25 19:15:59 +01:00
Taylor Wampler
e995e289db
math::nolibc: acos and asin
...
There are now nolibc definitions for the inverse cosine and inverse
sine.
More test points were added for acos, asin, and atan in the math_tests module.
This was done becuase the nolibc inverse trigonometric functions have
various branching conditions depending on the provided input value. Several
branches in these functions were neglected.
2024-12-24 11:29:32 +01:00