aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math.zig
AgeCommit message (Collapse)Author
2020-08-28std.math.divCeil: conform to more test casesKate Tsuyu
2020-08-28std.math.divCeil: handle floats correctlierKate Tsuyu
2020-08-28std.math.divCeil: handle floats correctlyKate Tsuyu
2020-08-28std: Add std.math.divCeilKate Tsuyu
2020-08-26forceEval() -> doNotOptimizeAway()Frank Denis
2020-08-26Rename blackBox, move it to std.mem.forceEval()Frank Denis
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-08-13stage2: implement while loops (bool condition)Andrew Kelley
* introduce a dump() function on Module.Fn which helpfully prints to stderr the ZIR representation of a function (can be called before attempting to codegen it). This is a debugging tool. * implement x86 codegen for loops * liveness: fix analysis of conditional branches. The logic was buggy in a couple ways: - it never actually saved the results into the IR instruction (fixed now) - it incorrectly labeled operands as dying when their true death was after the conditional branch ended (fixed now) * zir rendering is enhanced to show liveness analysis results. this helps when debugging liveness analysis. * fix bug in zir rendering not numbering instructions correctly closes #6021
2020-08-08utilize math.ceilPowerOfTwoAndrew Kelley
2020-07-11run zig fmt on std lib and self hostedVexu
2020-07-08stage2: machine code for condbr jumpsAndrew Kelley
2020-06-17Improve f128 standard library supportantlilja
* Add functions: floor128, ceil128, trunc128 and round128 * Add corresponding tests
2020-05-01ZIR: add cmp and condbr instructionsAndrew Kelley
2020-04-28std.meta.IntType -> std.meta.IntTadeo Kondrak
2020-04-16std: make math.clamp work for common uses, remove automatic bounds swappingAndrius Mitkus
2020-03-24std: Add qNaN constantsLemonBoy
2020-03-05std: use testing.expectEqual in math.absCast testsdaurnimator
2020-03-05std: fix math.absCast on i1daurnimator
2020-03-04std: Use @TypeOf(x,y) as return value for maxLemonBoy
2020-02-24remove uses of `@ArgType` and `@IntType`Vexu
2020-02-24remove usages of `@typeId`, `@memberCount`, `@memberName` and `@memberType`Vexu
2020-01-14Add clamp function to math moduleHersh Krishna
2020-01-01std.mem.compare: breaking API changesAndrew Kelley
* `std.mem.Compare` is now `std.math.Order` and the enum tags renamed to follow new style convention. * `std.mem.compare` is renamed to `std.mem.order`. * new function `std.math.order`
2019-12-16allow comparison of any numeric typesAndrew Kelley
2019-12-16std: lessThan and greaterThan between signed and unsignedShawn Landden
It is a deviation from C, but I think we should consider making this the behavior of the operators. See #2133
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-11-29std.math: remove constants that should be expressionsAndrew Kelley
All four of these can be represented in fewer characters with expressions, which will be guaranteed to happen at compile-time, and have the same or better precision. The other math constants here which depend on function calls could be similarly removed if and when #425 is solved. However I left them for now since Zig does not eagerly evaluate functions with comptime parameters.
2019-11-19add `std.math.tau` constant (equivalent to 2 * pi)dbandstra
2019-11-08update more of the std lib to use `@as`Andrew Kelley
2019-11-08update the codebase to use `@as`Andrew Kelley
2019-10-24refAllDecls in a test block to limit when it gets runAndrew Kelley
2019-10-16ref more math decls for better docsAndrew Kelley
2019-10-16turn comments into doc commentsAndrew Kelley
2019-10-16Add 'missing' consts to math.zigSebsatian Keller
The C library defines constants for log2e and sqrt2 etc. Those should also be available in zig.
2019-10-09generated docs: render valuesAndrew Kelley
also fix pressing enter in search box before search finishes closes #3409
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221