All Questions
Tagged with half-precision-float numpy
4 questions
1
vote
1
answer
62
views
What makes `print(np.half(500.2))` differs from `print(f"{np.half(500.2)}")`
everyone. I've been learning floating-point truncation errors recently. But I found print(np.half(500.2)) and print(f"{np.half(500.2)}") yield different results. Here are the logs I got in ...
1
vote
1
answer
3k
views
Convert 16 bit hex value to FP16 in Python?
I'm trying to write a basic FP16 based calculator in python to help me debug some hardware. Can't seem to find how to convert 16b hex values unto floating point values I can use in my code to do the ...
1
vote
1
answer
3k
views
Why does converting from np.float16 to np.float32 modify the value?
When converting a number from half to single floating representation I see a change in the numeric value.
Here I have 65500 stored as a half precision float, but upgrading to single precision changes ...
5
votes
1
answer
2k
views
Why is half-precision complex float arithmetic not supported in Python and CUDA?
NumPY has complex64 corresponding to two float32's.
But it also has float16's but no complex32.
How come? I have signal processing calculation involving FFT's where I think I'd be fine with ...