Book-reader
a6d33ec4af
Update stdlib to use struct member docs from #2427 and other small changes ( #2473 )
...
* Doc comment improvements
* update `compression/qoi.c3` to use const enums
* revert sweeping doc comment changes that impacted readability for now
* Some tweaks.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-09-19 18:41:32 +02:00
Christoffer Lerno
ca2fabc9f9
- $defined(#hash) will not check the internal expression, just that #hash exists.
...
- Added optional macro arguments using `macro foo(int x = ...)` which can be checked using `$defined(x)`.
- Supplemental `roundeven` has a normal implementation.
2025-08-29 11:23:39 +02:00
Christoffer Lerno
3c6e6f1965
Make log and exp no-strip.
2025-08-27 14:41:19 +02:00
Christoffer Lerno
a55f56a88f
Linker errors when shadowing @local with public function #2198
2025-06-18 02:07:07 +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
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
3cb5df5639
0.7 fixes. Improving the yacc grammar.
2025-04-04 18:14:16 +02: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
2a895ec7be
First 0.7 update, removing all deprecated features.
2025-03-03 00:32:20 +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
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
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
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
Taylor W
5020caa9c3
C3_MATH feature ( #1709 )
...
* C3_MATH feature
This feature allows the usage of noclib math files even when libc is in use.
If a nolibc symbol exists, it will be used in place of libc, otherwise
it will default to libc.
* Added MIT License notices to atan.c3
2024-12-23 23:42:57 +01:00
Christoffer Lerno
5d31cdfa16
Incorrect no-libc definition of cos, making it unavailable for wasm.
2024-12-12 21:50:56 +01:00
Christoffer Lerno
84d010bb2f
Remove accidental doc comment.
2024-11-14 11:14:02 +01:00
Christoffer Lerno
31cd839063
Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code.
2024-10-14 02:14:34 +02:00
Christoffer Lerno
9f10996ac7
Bug when a continue is copied in a defer.
2024-10-08 22:13:30 +02:00
Christoffer Lerno
a665978b64
Fixing some whitespace issues.
2024-10-08 19:38:31 +02:00
Christoffer Lerno
bc267e22bd
Add fmod implementation for nolibc.
2024-08-29 20:04:59 +02:00
Christoffer Lerno
b25c573ae3
Indexing into a constant array / struct now works at compile time. Constants defined by indexing into another constant could fail codegen. Stdlib nolibc code bugs fixed.
2024-07-20 01:20:03 +02:00
Christoffer Lerno
d5281b10dd
Cleanup use of macro inspection to use @typekind and @typeid macros.
2023-11-18 23:35:18 +01:00
Christoffer Lerno
3929e2057d
Change unreachable code to error. Remove unreachable where the compiler now can detect reachability.
2023-07-25 23:31:05 +02:00
Christoffer Lerno
4c1edfb941
Dev ( #777 )
...
* The new @if directive.
2023-06-10 23:16:28 +02:00
Christoffer Lerno
172d561f07
Change syntax of $if, $assert, $include, $echo. Introduces $error
2023-05-06 12:18:00 +02:00
Christoffer Lerno
5ee0d52ff1
Deprecate :; in $if etc.
2023-03-20 01:03:54 +01:00
Christoffer Lerno
9fa634b78b
is_finite / is_nan / is_inf, frexp native.
2023-03-18 21:17:18 +01:00
Christoffer Lerno
a041c53cdd
Add frexp.
2023-03-18 16:54:39 +01:00
Christoffer Lerno
a0a5c940f1
Add --strip-unused.
2023-02-16 22:11:42 +01:00
Christoffer Lerno
5e457be605
Implement more @export / @private improvements. Make @private default… ( #729 )
2023-02-13 08:31:40 +01:00
Christoffer Lerno
1548cd06ef
Enable local multi-declarations. Fix of builtin argument checking. Migrate to @noinit.
2023-02-11 02:03:02 +01:00
Christoffer Lerno
6407eb47a4
Remove of @extname in stdlib.
2023-02-02 21:53:37 +01:00
Christoffer Lerno
3b3773663a
Adding sincos / libc tan/tanf.
2023-02-02 19:29:29 +01:00
Christoffer Lerno
0f4d20f168
Fix issue with hex floats with f being assumed to be double. Added cos sincos sincosf pow2 pow2f to nolibc.
2023-02-02 13:20:52 +01:00
Kenta
f9b6f1da0e
Update trig.c3
...
Add cosf
2023-02-01 16:42:16 +01:00
Christoffer Lerno
9a08c9d821
Fixes to wasm and function attributes.
2023-01-28 00:37:46 +01:00
Christoffer Lerno
39801a304d
Improved support for freestanding.
2023-01-25 11:27:57 +01:00
Christoffer Lerno
a22ebbb0ef
Improved support for freestanding.
2023-01-25 11:10:37 +01:00