is it possible to create a custom NaN value in Python?
I know a bit about floating point representation and that NaN is a FP value with some special exponent. Therefore, each FP value with that special exponent is a NaN.
To be precise, what I want to do is:
x = make_my_special_NaN(int_seed)
assert math.isnan(x)
assert test_my_special_NaN(x, int_seed)
assert not test_my_special_NaN(float("nan"), int_seed)
The function which I called make_my_special_NaN
should take an integer seed which can
be used to identify the special NaN value I have (if this is possible).
Having this, it should be possible to test if a given NaN value is the special NaN given that integer seed.
Thanks in advance