2 thoughts on “find-indices-of-negative-values

    • When comparing floating point numbers, you have to allow for some imprecision. It’s better to use an Epsilon to widen the range of acceptable values by a small amount so as to reduce rounding errors.

      For example, you might think you have the value 1, but in reality you`re getting 1.000000119209290.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s