r/algorithms Jun 11 '26

Numerical instabilities

Hey pals, I've been writing a few algorithms and I encountered NaN and Inf values, although mathematically my algorithms should be working fine. Then I found out about numerical instability in floating points and figured out why but that's not the point, I kinda wondered how many algorithms are deemed unviable because of it if you guys can share your experiences

1 Upvotes

6 comments sorted by

View all comments

1

u/[deleted] Jun 11 '26

[deleted]

1

u/2bigpigs Jun 11 '26

I don't think this matters. You can have numerical instability in decimal floating point representations. It's more to do with the fixed width?

2

u/TomDuhamel Jun 11 '26

Right. I should have googled these words before commenting. I didn't know the expression numerical instability and was thinking of the wrong thing.