zig/lib/std
LemonBoy ff14451b4a std: Implement more useful approxEq semantics
Comparisons with absolute epsilons are usually useful when comparing
numbers to zero, for non-zero numbers it's advised to switch to relative
epsilons instead to obtain meaningful results (check [1] for more
details).

The new API introduces approxEqAbs and approxEqRel, where the former
aliases and deprecated the old `approxEq`, allowing the user to pick the
right tool for the job.

The documentation is meant to guide the user in the choice of the
correct alternative.

[1] https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
2020-11-05 16:08:49 +01:00
..
atomic add license header to all std lib files 2020-08-20 16:07:04 -04:00
build std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
c Clean up exporting of symbols on Darwin 2020-10-28 10:36:19 +01:00
compress std/deflate: Avoid reading past end of stream 2020-10-29 17:16:03 +01:00
crypto Make Gimli test vector look like the python implementation 2020-11-03 09:13:14 +01:00
debug Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
event Add missing arg 2020-11-01 15:40:42 -05:00
fmt std: Implement more useful approxEq semantics 2020-11-05 16:08:49 +01:00
fs std.fs.File.writeFileAll: support unseekable files 2020-11-03 15:25:43 -07:00
hash Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
heap Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
io std: Fix syscall stubs passing 64bit offsets for BE targets 2020-11-02 12:11:07 +01:00
json std: Fix json utf{8,16} decoding on BE targets 2020-11-02 11:46:50 +01:00
math std: Implement more useful approxEq semantics 2020-11-05 16:08:49 +01:00
mem use Allocator.allocSentinel now that the stage1 bug is fixed 2020-09-29 12:06:35 -07:00
meta Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
net More fixups for Windows targets 2020-10-28 10:03:23 +01:00
os Add missing LONG_PTR type 2020-11-04 18:30:48 -06:00
rand add license header to all std lib files 2020-08-20 16:07:04 -04:00
special std: Implement more useful approxEq semantics 2020-11-05 16:08:49 +01:00
target Use correct names for generic SPARC targets 2020-10-24 20:03:41 +07:00
testing add license header to all std lib files 2020-08-20 16:07:04 -04:00
time add license header to all std lib files 2020-08-20 16:07:04 -04:00
unicode add license header to all std lib files 2020-08-20 16:07:04 -04:00
valgrind add license header to all std lib files 2020-08-20 16:07:04 -04:00
zig Refactor the code according to Andrew's suggestions 2020-11-02 18:38:09 +01:00
array_hash_map.zig std: Re-enable ArrayHashMap test for mips targets 2020-11-02 11:46:07 +01:00
array_list.zig Fix std.ArrayListUnmanaged + improve test coverage 2020-09-29 19:49:13 +02:00
array_list_sentineled.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
ascii.zig std/ascii: add spaces array 2020-11-02 13:20:58 -05:00
atomic.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
auto_reset_event.zig Add more comments & cleanup AutoResetEvent 2020-10-11 19:16:07 -05:00
base64.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
buf_map.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
buf_set.zig hash_map: rename to ArrayHashMap and add new HashMap implementation 2020-09-02 00:17:50 +02:00
build.zig Refactor the code according to Andrew's suggestions 2020-11-02 18:38:09 +01:00
builtin.zig stage1: Implement Add/Mul reduction operators 2020-11-01 14:30:31 -07:00
c.zig Merge pull request #6838 from LemonBoy/netstuff 2020-10-29 15:10:29 -04:00
child_process.zig Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
coff.zig Completed basic PE linker for stage2 2020-09-04 05:15:03 +03:00
compress.zig std: Add a gzip decoder 2020-09-11 20:02:41 -04:00
comptime_string_map.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
crypto.zig PascalCase *box names, remove unneeded comptime & parenthesis 2020-10-28 21:43:15 +02:00
cstr.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
debug.zig std: Minor changes to startup code 2020-10-19 15:15:43 +02:00
dwarf.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
dwarf_bits.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
dynamic_library.zig Merge branch 'master' into openbsd-minimal 2020-10-17 17:38:23 +02:00
elf.zig openbsd: make dl_phdr_info cross arches 2020-10-25 20:46:28 -04:00
event.zig add WaitGroup to std.event 2020-10-07 04:34:09 -04:00
fifo.zig Make LinearFifo not crash when discarding from empty buffer 2020-09-27 05:46:39 -04:00
fmt.zig std: Make parseInt/parseUnsigned detect the radix 2020-11-02 14:13:06 -05:00
fs.zig Fix file descriptor leak in fs.openFileZ. 2020-11-02 13:28:29 -05:00
hash.zig Promote hash/siphash to crypto/siphash 2020-08-22 02:47:50 -04:00
hash_map.zig Switch type of HashMap's count from usize to u32 (#6262) 2020-09-09 00:33:14 -04:00
heap.zig Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
io.zig zig fmt: Remove dynamic stack from auto-indenting-stream 2020-08-31 23:39:50 +10:00
json.zig std: Fix json utf{8,16} decoding on BE targets 2020-11-02 11:46:50 +01:00
linked_list.zig std: remove init functions from linked list nodes 2020-08-22 02:47:39 -04:00
log.zig fix another round of regressions in this branch 2020-09-26 21:03:38 -07:00
macho.zig Write out LC_DYSYMTAB together with dyld_stub_binder undef symbol 2020-10-04 15:31:47 +02:00
math.zig std: Implement more useful approxEq semantics 2020-11-05 16:08:49 +01:00
mem.zig sparc64 has a 8Kb page size 2020-11-03 17:29:20 -05:00
meta.zig std.meta: test that const and mut variables have different addresses 2020-11-03 16:52:51 -05:00
mutex.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
net.zig More fixups for Windows targets 2020-10-28 10:03:23 +01:00
once.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
os.zig std: add {set,get}rlimit bits and improve test 2020-11-01 15:47:46 -05:00
packed_int_array.zig Merge branch 'openbsd-minimal' of https://github.com/semarie/zig into semarie-openbsd-minimal 2020-10-17 17:34:43 -07:00
pdb.zig update rest of tests 2020-09-04 22:49:14 +03:00
priority_queue.zig removing redundant assert 2020-09-22 05:12:21 -07:00
process.zig Make argsAlloc/ArgIterator return zero-sentinel strings (#6720) 2020-10-22 17:52:48 -04:00
progress.zig Introduces a space after the ellipsis for test and progress. 2020-09-03 18:07:30 -04:00
rand.zig Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
reset_event.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
segmented_list.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
sort.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
spinlock.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
start.zig starting_stack_ptr -> argc_argv_ptr to reflect actual use 2020-10-27 22:46:18 +07:00
start_windows_tls.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
std.zig std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
target.zig Add sparc64-specific values for the various SA_ and SIG_ constants 2020-10-24 20:05:34 +07:00
testing.zig std: Fix expectWithinEpsilon with negative values 2020-11-01 14:30:31 -07:00
thread.zig update uses of deprecated type field access 2020-09-03 18:10:40 +03:00
time.zig std: Fix early overflow in time calculation 2020-11-01 17:06:14 -05:00
unicode.zig std: Fix std.unicode test cases for BE targets 2020-11-02 11:48:06 +01:00
valgrind.zig add license header to all std lib files 2020-08-20 16:07:04 -04:00
zig.zig std: remove renderStringLiteral in favor of std.fmt specifier 2020-10-17 23:20:38 +03:00