You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there's no way to directly ask for infinity, -infinity, or NaN. There should be:
Floating point special values #6711 Add builtins for Num.infinityF32 : F32, Num.infinityF64 : F64, Num.nanF32 : F32, and Num.nanF64 : F64 - at first, they can just be equal to expressions which evaluate to those (e.g. infinityF32 = 1 / 0, nanF64 = 0 / 0).
Make a separate issue to replace the = 1 / 0 implementations with compiler-generated numbers, since that will result in better runtime perf in dev builds.
Change the repl so that for infinity, we print out Num.infinityF32 or Num.infinityF64 instead of ∞ and -∞ today (use infinityF64 if the number's type is Frac *), and do the same for nan. For negative infinity, print out -Num.infinityF32 or -Num.infinityF64. Relevant code is here; some tests will also need to be updated.
The text was updated successfully, but these errors were encountered:
Currently there's no way to directly ask for infinity, -infinity, or NaN. There should be:
Num.infinityF32 : F32
,Num.infinityF64 : F64
,Num.nanF32 : F32
, andNum.nanF64 : F64
- at first, they can just be equal to expressions which evaluate to those (e.g.infinityF32 = 1 / 0
,nanF64 = 0 / 0
).= 1 / 0
implementations with compiler-generated numbers, since that will result in better runtime perf in dev builds.Num.infinityF32
orNum.infinityF64
instead of∞
and-∞
today (useinfinityF64
if the number's type isFrac *
), and do the same fornan
. For negative infinity, print out-Num.infinityF32
or-Num.infinityF64
. Relevant code is here; some tests will also need to be updated.The text was updated successfully, but these errors were encountered: