Comments (4)
BigNum as a language feature is going to need RAII semantics (destructors and copy/move semantics). As just about all standard implementations will allocate auxiliary memory that needs to be cleaned up.
Though if you just want something that works for compile-time constant folding then something like gmp (licenced under LGPL v3) would work. It does both integer and floating point math.
from odin.
Sorry for the confusion but I do not want this to be a run time feature but rather a compile time feature for the constant system. I want numbers to just work as number.
gmp might be a good option so I might have to consider it.
from odin.
http://www.libtom.net/LibTomMath/ is also a good alternative. Dual licensed as public domain / WTFPL.
from odin.
This has been implemented with the new custom BigInt
library. As the name suggests, only integers are supported, no BigFloat
yet.
from odin.
Related Issues (20)
- `using` sometimes doesn't work HOT 7
- Panic when using `distinct []byte` in a union
- Issues with core:text/i18n.parse_mo_from_bytes(): 1. it doesn't know about key contexts HOT 3
- Issues with core:text/i18n.parse_mo_from_bytes(): 2. number of plural forms HOT 2
- Linking fails on dev-2024-05 with: cannot find crtbegin.o HOT 6
- Compiler fails to error #load()
- Dynamically setting width format no longer working HOT 1
- Compiler crash when using #load with or_return and diverging procedure HOT 1
- Matrix type wrapped in a `Maybe` triggers assert
- Default switch case can panics compiler for pointer to union reference HOT 1
- min(type),max(type) in global array initializer yields LLVM error HOT 1
- [core/thread] "unexpected" Odin thread semantics that differ from pthread's semantics HOT 8
- arm32 homogeneous aggregates ABI issues HOT 1
- Checker errors depending on declaration locations (single threaded)
- Compiler crashes when using the a,b=b,a syntax on large arrays HOT 3
- Assignment of constant to array in return value causes code generation problem. HOT 1
- pitch_from_quaternion calculation typo
- Unsigned Int Overflow cannot be relied on for constant-folded literals HOT 1
- Panic un-gep-able type during compilation of soa array/slice
- Return types are incorrect for Metal `commandBufferWith_` methods
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odin.