aboutsummaryrefslogtreecommitdiff
path: root/std/math/expm1.zig
AgeCommit message (Collapse)Author
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221
2019-05-01std.math: Add documentation for all functions and algorithm sourcesMarc Tiehuis
2019-03-02rename std lib files to new conventionAndrew Kelley
2019-02-08std.debug.assert: remove special case for test buildsAndrew Kelley
Previously, std.debug.assert would `@panic` in test builds, if the assertion failed. Now, it's always `unreachable`. This makes release mode test builds more accurately test the actual code that will be run. However this requires tests to call `std.testing.expect` rather than `std.debug.assert` to make sure output is correct. Here is the explanation of when to use either one, copied from the assert doc comments: Inside a test block, it is best to use the `std.testing` module rather than assert, because assert may not detect a test failure in ReleaseFast and ReleaseSafe mode. Outside of a test block, assert is the correct function to use. closes #1304
2018-08-23Default to strict IEEE floating pointMarc Tiehuis
Closes #1227.
2018-06-19`@floatToInt` now has safety-checked undefined behaviorAndrew Kelley
when the integer part does not fit in the destination integer type * Also fix incorrect safety triggered for integer casting an `i32` to a `u7`. closes #1138 * adds compiler-rt function: `__floatuntidf`
2018-06-17remove integer and float casting syntaxAndrew Kelley
* add `@intCast` * add `@floatCast` * add `@floatToInt` * add `@intToFloat` See #1061
2018-05-29run zig fmt on the codebaseAndrew Kelley
See #1003
2018-01-25syntax: functions require return type. remove `->`Andrew Kelley
The purpose of this is: * Only one way to do things * Changing a function with void return type to return a possible error becomes a 1 character change, subtly encouraging people to use errors. See #632 Here are some imperfect sed commands for performing this update: remove arrow: ``` sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig") ``` add void: ``` sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig") ``` Some cleanup may be necessary, but this should do the bulk of the work.
2018-01-06fix exp1m implementationAndrew Kelley
in the llvm6 branch with assertions on, it failed the test this fixes it
2017-12-23move std/debug.zig to a subdirectoryAndrew Kelley
self hosted compiler parser tests do some fuzz testing
2017-12-22std.math: remove unnecessary inline calls andAndrew Kelley
workaround windows 32 bit test failure See #537
2017-12-22explicitly return from blocksAndrew Kelley
instead of last statement being expression value closes #629
2017-09-28Allow 128-bit hex float literalsMarc Tiehuis
Closes #499.
2017-08-28remove workaround for LLVM not respecting "nobuiltin"Andrew Kelley
now that we depend on LLVM 5.0.0 we can remove the workaround. closes #393
2017-08-19bit shifting safetyAndrew Kelley
* add u3, u4, u5, u6, u7 and i3, i4, i5, i6, i7 * shift operations shift amount parameter type is integer with log2 bit width of other param - This enforces not violating undefined behavior on shift amount >= bit width with the type system * clean up math.log, math.ln, math.log2, math.log10 closes #403
2017-08-09more intuitive left shift and right shift operatorsAndrew Kelley
Before: * << is left shift, not allowed to shift 1 bits out * <<% is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out After: * << is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out * @shlExact is left shift, not allowed to shift 1 bits out * @shrExact is right shift, not allowed to shift 1 bits out Closes #413
2017-06-21Fixes for release mode testsMarc Tiehuis
2017-06-20Add math special case tests and general fixesMarc Tiehuis
- Should cover special case inputs for most functions - Fixed a number of runtime panicking behaviour reliant on shift overflow/division by zero etc.
2017-06-19workaround for llvm bugAndrew Kelley
See #393 for details
2017-06-16Add math libraryMarc Tiehuis
This covers the majority of the functions as covered by the C99 specification for a math library. Code is adapted primarily from musl libc, with the pow and standard trigonometric functions adapted from the Go stdlib. Changes: - Remove assert expose in index and import as needed. - Add float log function and merge with existing base 2 integer implementation. See https://github.com/tiehuis/zig-fmath. See #374.