zig/lib/std/math
Cody Tapscott 3295fee911 stage2: Use mem.readPackedInt etc. for packed bitcasts
Packed memory has a well-defined layout that doesn't require
conversion from an integer to read from. Let's use it :-)

This change means that for bitcasting to/from a packed value that
is N layers deep, we no longer have to create N temporary big-ints
and perform N copies.

Other miscellaneous improvements:
  - Adds support for casting to packed enums and vectors
  - Fixes bitcasting to/from vectors outside of a packed struct
  - Adds a fast path for bitcasting <= u/i64
  - Fixes bug when bitcasting f80 which would clear following fields

This also changes the bitcast memory layout of exotic integers on
big-endian systems to match what's empirically observed on our targets.
Technically, this layout is not guaranteed by LLVM so we should probably
ban bitcasts that reveal these padding bits, but for now this is an
improvement.
2022-10-28 08:41:04 -07:00
..
big stage2: Use mem.readPackedInt etc. for packed bitcasts 2022-10-28 08:41:04 -07:00
complex Simplify Copysign 2022-05-17 21:55:22 +01:00
acos.zig
acosh.zig
asin.zig
asinh.zig
atan.zig
atan2.zig
atanh.zig Simplify Copysign 2022-05-17 21:55:22 +01:00
big.zig
cbrt.zig
complex.zig std: remove deprecated API for the upcoming release 2022-09-16 14:46:53 -04:00
copysign.zig stage2: lower float negation explicitly 2022-06-30 00:02:00 -07:00
cosh.zig
expm1.zig
expo2.zig
float.zig Sema: fix parameter of type 'T' must be comptime error 2022-08-22 11:16:36 +03:00
frexp.zig
gcd.zig std.math: add "Greatest common divisor" (gcd) 2022-09-29 21:42:56 +03:00
hypot.zig
ilogb.zig compiler_rt: Re-implement ldexp/ilogb using bit-ops 2022-10-09 11:09:02 -07:00
isfinite.zig std.math: simpler error handling 2022-05-17 22:04:12 +01:00
isinf.zig std.math: add inline to some functions 2022-07-13 11:14:46 -07:00
isnan.zig
isnormal.zig std.math: simpler error handling 2022-05-17 22:04:12 +01:00
ldexp.zig Manually construct denormal constants in tests 2022-10-09 20:29:30 -07:00
ln.zig
log.zig
log1p.zig
log2.zig std.math: Add O(log N) implementation of log2(x) for comptime_int 2022-06-07 20:07:40 -04:00
log10.zig
modf.zig
nan.zig stage2: fix recent LLVM backend code 2022-04-27 14:18:34 -07:00
pow.zig Simplify Copysign 2022-05-17 21:55:22 +01:00
powi.zig std.math.powi: use standard definition of underflow/overflow, implement u0, i0, i1 edge case (#11499) 2022-05-16 18:28:20 -04:00
scalbn.zig
signbit.zig stage2: lower float negation explicitly 2022-06-30 00:02:00 -07:00
sinh.zig
sqrt.zig
tanh.zig