Answer the question
In order to leave comments, you need to log in
In what cases can I get infinity in a float variable?
Good afternoon everyone. I have the following formula in my calculations
When streaming, some responses get infinity.
I have a suspicion that at some iterations, the value is larger than the float variable can accommodate.
Is it so ? return (float) S / (float) (L- M)
Answer the question
In order to leave comments, you need to log in
Print operands in cases where you get infinity.
Most likely LM == 0 at these moments
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question