Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does EPS mean in C?

Tags:

c

eps

I have the following code snippet:

if (ABS(p43.x)  < EPS && ABS(p43.y)  < EPS && ABS(p43.z)  < EPS) return(FALSE);

Which I'm trying to convert to C#. What does "EPS" mean?

This code is from http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline3d/

like image 753
John Avatar asked Mar 09 '09 16:03

John


People also ask

What is epsilon value in programming?

Machine Epsilon is a machine-dependent floating point value that provides an upper bound on relative error due to rounding in floating point arithmetic. Mathematically, for each floating point type, it is equivalent to the difference between 1.0 and the smallest representable value that is greater than 1.0.

What is the value of EPS in double precision computers?

Accuracy in Double Precision In base 2 , eps is equal to 2^-52 . Return the distance from 10.0 to the next larger double-precision number.


1 Answers

It's going to be some form of epsilon to determine whether the number is "small enough to be insignificant". The exact value looks like it's being #defined somewhere in this case.

like image 115
Jon Skeet Avatar answered Sep 20 '22 06:09

Jon Skeet