dirty-equals icon indicating copy to clipboard operation
dirty-equals copied to clipboard

nan type

Open samuelcolvin opened this issue 2 years ago • 1 comments

Since float('nan') != float('nan') we need a custom FloatNan type.

samuelcolvin avatar Oct 11 '22 17:10 samuelcolvin

inf/-inf too?

samuelcolvin avatar Oct 11 '22 17:10 samuelcolvin

Hi @samuelcolvin, if there is still interest in this issue I can take it! Any drawback in using math.isnan and math.isinf for the checks?

FBruzzesi avatar Mar 22 '23 11:03 FBruzzesi

definitely still interest, no drawback I know of to math.isnan.

I guess we have FloatNan, FloatInfPos, FloatInfNeg?

samuelcolvin avatar Mar 22 '23 11:03 samuelcolvin

I would consider a more general FloatInf as well (that's the use case it brought me here in the first place).

Just to make sure on naming convention, they should all have a Is prefix, correct?

FBruzzesi avatar Mar 22 '23 11:03 FBruzzesi

Sorry, yes Is prefix.

FloatInf is fine by me.

samuelcolvin avatar Mar 22 '23 12:03 samuelcolvin

This is done, yes?

alexmojaki avatar Sep 07 '23 22:09 alexmojaki