zig icon indicating copy to clipboard operation
zig copied to clipboard

`std.math`: Better `comptime_float` and `comptime_int` support in `std.math` functions

Open Danielkonge opened this issue 1 month ago • 0 comments

Adds comptime_float support to

  • approxEqAbs
  • approxEqRel
  • various std.math.float functions
  • isNormal
  • isFinite
  • isPositiveZero
  • isNegativeZero
  • frexp
  • ldexp
  • pow

Also adds comptime_int support to powi.

Starts adoption of the comptime_float behavior described in https://github.com/ziglang/zig/issues/21205#issuecomment-2613393221

Closes: #23602

Danielkonge avatar Nov 07 '25 00:11 Danielkonge