aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-01-17 22:17:07 +0000
committergingerBill <bill@gingerbill.org>2022-01-17 22:17:07 +0000
commitfb01dfe04845a489760956cea4f0019e1464b2e3 (patch)
treeb5ac107898a61ba786b4c8f6bd5bf1f005c518f5 /core
parentc7a9c8274fc212ec421d46c2c58f36afdc949898 (diff)
Improve docs_writer.cpp
Diffstat (limited to 'core')
-rw-r--r--core/math/big/doc.odin22
-rw-r--r--core/math/big/internal.odin24
-rw-r--r--core/math/big/tune.odin3
3 files changed, 24 insertions, 25 deletions
diff --git a/core/math/big/doc.odin b/core/math/big/doc.odin
index f5e0900f5..0f9b88d01 100644
--- a/core/math/big/doc.odin
+++ b/core/math/big/doc.odin
@@ -2,27 +2,5 @@
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.
-
-========================== Low-level routines ==========================
-
-IMPORTANT: `internal_*` procedures make certain assumptions about their input.
-
-The public functions that call them are expected to satisfy their sanity check requirements.
-This allows `internal_*` call `internal_*` without paying this overhead multiple times.
-
-Where errors can occur, they are of course still checked and returned as appropriate.
-
-When importing `math:core/big` to implement an involved algorithm of your own, you are welcome
-to use these procedures instead of their public counterparts.
-
-Most inputs and outputs are expected to be passed an initialized `Int`, for example.
-Exceptions include `quotient` and `remainder`, which are allowed to be `nil` when the calling code doesn't need them.
-
-Check the comments above each `internal_*` implementation to see what constraints it expects to have met.
-
-We pass the custom allocator to procedures by default using the pattern `context.allocator = allocator`.
-This way we don't have to add `, allocator` at the end of each call.
-
-TODO: Handle +/- Infinity and NaN.
*/
package math_big
diff --git a/core/math/big/internal.odin b/core/math/big/internal.odin
index 5085898e5..dbcd16509 100644
--- a/core/math/big/internal.odin
+++ b/core/math/big/internal.odin
@@ -1,10 +1,32 @@
-//+ignore
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
+
+ ========================== Low-level routines ==========================
+
+ IMPORTANT: `internal_*` procedures make certain assumptions about their input.
+
+ The public functions that call them are expected to satisfy their sanity check requirements.
+ This allows `internal_*` call `internal_*` without paying this overhead multiple times.
+
+ Where errors can occur, they are of course still checked and returned as appropriate.
+
+ When importing `math:core/big` to implement an involved algorithm of your own, you are welcome
+ to use these procedures instead of their public counterparts.
+
+ Most inputs and outputs are expected to be passed an initialized `Int`, for example.
+ Exceptions include `quotient` and `remainder`, which are allowed to be `nil` when the calling code doesn't need them.
+
+ Check the comments above each `internal_*` implementation to see what constraints it expects to have met.
+
+ We pass the custom allocator to procedures by default using the pattern `context.allocator = allocator`.
+ This way we don't have to add `, allocator` at the end of each call.
+
+ TODO: Handle +/- Infinity and NaN.
*/
+//+ignore
package math_big
import "core:mem"
diff --git a/core/math/big/tune.odin b/core/math/big/tune.odin
index 64a73b656..78a20c12b 100644
--- a/core/math/big/tune.odin
+++ b/core/math/big/tune.odin
@@ -1,4 +1,3 @@
-//+ignore
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -8,7 +7,7 @@
The code started out as an idiomatic source port of libTomMath, which is in the public domain, with thanks.
*/
-
+//+ignore
package math_big
import "core:time"