Package lines for core:math and more.

This commit is contained in:
Jeroen van Rijn
2025-10-09 19:56:21 +02:00
parent b8fdd91c9f
commit c4c2431997
23 changed files with 39 additions and 42 deletions
+2 -2
View File
@@ -1,3 +1,5 @@
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -5,8 +7,6 @@
This file collects public proc maps and their aliases.
*/
package math_big
/*
=== === === === === === === === === === === === === === === === === === === === === === === ===
+2 -3
View File
@@ -1,11 +1,10 @@
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
*/
package math_big
import "base:intrinsics"
/*
+4 -3
View File
@@ -1,6 +1,7 @@
// package big implements arbitrary precision integers and rationals.
package math_big
/*
A BigInt implementation in Odin.
For the theoretical underpinnings, see Knuth's The Art of Computer Programming, Volume 2, section 4.3.
The code started out as an idiomatic source port of libTomMath, which is in the public domain, with thanks.
*/
package math_big
*/
+2 -3
View File
@@ -1,11 +1,10 @@
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
*/
package math_big
import "base:intrinsics"
import "base:runtime"
import rnd "core:math/rand"
+2 -2
View File
@@ -1,3 +1,5 @@
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -25,8 +27,6 @@
TODO: Handle +/- Infinity and NaN.
*/
package math_big
import "base:builtin"
import "base:intrinsics"
import "core:mem"
+2 -3
View File
@@ -1,3 +1,5 @@
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -9,9 +11,6 @@
This file contains logical operations like `and`, `or` and `xor`.
*/
package math_big
/*
The `and`, `or` and `xor` binops differ in two lines only.
We could handle those with a switch, but that adds overhead.
+2 -3
View File
@@ -1,3 +1,5 @@
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -9,9 +11,6 @@
This file contains prime finding operations.
*/
package math_big
/*
Determines if an Integer is divisible by one of the _PRIME_TABLE primes.
Returns true if it is, false if not.
+2 -3
View File
@@ -1,3 +1,5 @@
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -16,9 +18,6 @@
These aren't exported for the same reasons.
*/
package math_big
import "base:intrinsics"
import "core:mem"
+2 -3
View File
@@ -1,3 +1,5 @@
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -9,9 +11,6 @@
This file contains basic arithmetic operations like `add`, `sub`, `mul`, `div`, ...
*/
package math_big
import "base:intrinsics"
/*
+2 -3
View File
@@ -1,3 +1,5 @@
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -13,9 +15,6 @@
- Also look at extracting and splatting several digits at once.
*/
package math_big
import "base:intrinsics"
import "core:mem"
import "core:os"
+3 -3
View File
@@ -1,3 +1,6 @@
#+build ignore
package math_big
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -7,9 +10,6 @@
The code started out as an idiomatic source port of libTomMath, which is in the public domain, with thanks.
*/
#+build ignore
package math_big
import "core:time"
import "base:runtime"