diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-07-28 21:09:52 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-08-11 20:59:51 +0200 |
| commit | 85aa4dd670ce308eaf51b6eefd10dd62a227c998 (patch) | |
| tree | e06d3bede43a0851441d0613215053a948ff3267 /core/math/big/common.odin | |
| parent | 74258a170a20fd5a8fb6afe420b7d877d674c100 (diff) | |
big: Start test suite.
Diffstat (limited to 'core/math/big/common.odin')
| -rw-r--r-- | core/math/big/common.odin | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/core/math/big/common.odin b/core/math/big/common.odin index dd17a678f..59e76a9aa 100644 --- a/core/math/big/common.odin +++ b/core/math/big/common.odin @@ -66,6 +66,23 @@ Error :: enum byte { Unimplemented = 127, }; +Error_String :: #partial [Error]string{ + .None = "None", + .Out_Of_Memory = "Out of memory", + .Invalid_Pointer = "Invalid pointer", + .Invalid_Argument = "Invalid argument", + + .Unknown_Error = "Unknown error", + .Max_Iterations_Reached = "Max iterations reached", + .Buffer_Overflow = "Buffer overflow", + .Integer_Overflow = "Integer overflow", + + .Division_by_Zero = "Division by zero", + .Math_Domain_Error = "Math domain error", + + .Unimplemented = "Unimplemented", +}; + Primality_Flag :: enum u8 { Blum_Blum_Shub = 0, /* BBS style prime */ Safe = 1, /* Safe prime (p-1)/2 == prime */ |