aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math
AgeCommit message (Collapse)Author
2020-06-09fix memory errorsJonathan Marler
2020-05-01fix off-by-one error in sizeInBaseUpperBoundAndrew Kelley
2020-05-01update std.meta.IntType => std.meta.IntAndrew Kelley
2020-05-01rework std.math.big.IntAndrew Kelley
Now there are 3 types: * std.math.big.int.Const - the memory is immutable, only stores limbs and is_positive - all methods operating on constant data go here * std.math.big.int.Mutable - the memory is mutable, stores capacity in addition to limbs and is_positive - methods here have some Mutable parameters and some Const parameters. These methods expect callers to pre-calculate the amount of resources required, and asserts that the resources are available. * std.math.big.int.Managed - the memory is mutable and additionally stores an allocator. - methods here perform the resource calculations for the programmer. - this is the high level abstraction from before Each of these 3 types can be converted to the other ones. You can see the use case for this in the self-hosted compiler, where we only store limbs, and construct the big ints as needed. This gets rid of the hack where the allocator was optional and the notion of "fixed" versions of the struct. Such things are now modeled with the `big.int.Const` type.
2020-05-01ZIR: implement return instructionAndrew Kelley
2020-05-01ZIR: add cmp and condbr instructionsAndrew Kelley
2020-04-28std.meta.IntType -> std.meta.IntTadeo Kondrak
2020-04-26Fix f64 variants of math.cosh and math.sinh to accept negative inputs. (#5172)Nick Appleton
* add tests for negative inputs to cosh32 and cosh64. fix bug in cosh64 for negative inputs. * fix problem with negative input with f64 sinh and add tests
2020-04-22std.math.big.Int: don't rely on the allocator when printingAndrew Kelley
2020-04-21ir: analyze int castingAndrew Kelley
2020-04-15Enable formatting in std.big.Int.formatjoachimschmidt557
2020-04-15translate-c cleanup and zig fmtVexu
2020-04-07move big.rational.gcd to big.int.gcdjoachimschmidt557
2020-04-02new ArrayList API: fix everything elsexackus
2020-03-24Merge remote-tracking branch 'origin/llvm10'Andrew Kelley
LLVM 10 was released today
2020-03-23Use math.Order for comparing bigints instead of i8 (#4791)Joachim Schmidt
2020-03-23Merge pull request #4741 from momumi/masterAndrew Kelley
allow `_` separators in number literals (stage 1)
2020-03-22update parsing of int literals in self-hostedmomumi
* update std.math.big.Int.setString() to ignore underscores and make it case insensitive * fix issue in ir.zig with leading zeroes in integer literals
2020-03-19Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-17clean up some self-hosted bitrot + don't assume libstdc++Andrew Kelley
closes #4682 The self-hosted compiler is still bit rotted and still not compiling successfully yet. I have a more serious rework of the code in a different branch.
2020-03-13Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-12Replace fmt with new fmtstreamBenjamin Feng
2020-03-12Integrated outstreams with new formatterBenjamin Feng
2020-03-03Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-01short std.builtin enum literals in std libxackus
2020-02-28update std lib to new Target APIAndrew Kelley
2020-02-25Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-24remove uses of `@ArgType` and `@IntType`Vexu
2020-02-24remove usages of `@typeId`, `@memberCount`, `@memberName` and `@memberType`Vexu
2020-02-14Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-14std: use testing.allocator in testsdaurnimator
2020-02-14std: use testing.allocator in big int testsdaurnimator
2020-02-14std: bigint.deinit() shouldn't need a mutable pointerdaurnimator
2020-02-07remove workarounds for Windows native CPU featuresAndrew Kelley
bug fixed in LLVM 10 closes #508
2020-01-21enable native CPU feature for windows; disable failing testsAndrew Kelley
See #508. These can be re-enabled when we upgrade to LLVM 10.
2020-01-07Use the correct calling convention for AEABI intrinsicsLemonBoy
2020-01-06zig fmt and update `extern fn` to `callconv(.C)`Andrew Kelley
2020-01-05remove @TypeOf() hacks for comptime_int/comptime_floatHaze Booth
2020-01-01fix float ops with respect to vectorsAndrew Kelley
also remove the redundant type parameter
2019-12-28Add missing deferred deinits to `math.big.Int.toString` (mem leak fix)ForLoveOfCats
2019-12-10Replace @typeOf with @TypeOf in all zig sourceRobin Voetter
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-12-08std.fmt.format: tuple parameter instead of var argsAndrew Kelley
2019-12-06remove `@inlineCall` from zigAndrew Kelley
2019-11-08update more of the std lib to use `@as`Andrew Kelley
2019-11-08update the codebase to use `@as`Andrew Kelley
2019-11-04Add karatsuba to big intsBrendan Hansknecht
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221