Questions tagged [epsilon]

The machine epsilon gives an upper bound on the relative error due to rounding in floating point arithmetic. The quantity is also called "macheps" or "unit roundoff".

The IEEE standard does not define the terms machine epsilon and unit roundoff, so differing definitions of these terms are in use, which can cause some confusion.

The following different definition is much more widespread outside academia: Machine epsilon is defined as the smallest number that, when added to one, yields a result different from one.

158 questions
-1
votes
1 answer

Best way to calculate machine epsilon in PHP?

What is best / most correct way of directly calculating machine epsilon (floating point rounding error) in PHP, not using built-in constant PHP_FLOAT_EPSILON ? Currently, I've managed to research two ways, "standard" and asymptotically approaching…
Agnius Vasiliauskas
  • 10,935
  • 5
  • 50
  • 70
-1
votes
1 answer

Why compute the sign and multiply again by the absolute value?

While looking into some MATLAB code, I found this (simplified version) is = 1.414 % just any floating point value tol=1.e-4 s=sign(is); if(s==0), s=1; end; is=s*abs(is)*tol/eps But it doesn't make sense to me. What is the difference with the code…
Heungson
  • 61
  • 5
-1
votes
1 answer

Issue with cannot resolve method & symbol

From this code I have a few issue with the sqrt, sin & cos cannot resolve method and the EPSILON cannot resolve symbol. Do I need to add in math library for the sin cos & sqrt? If yes can you give me the link to download the jar? float…
MdZain
  • 1
  • 4
-1
votes
1 answer

What will be the e-closure(r) in following NFA

Sorry guys I cannot provide the pic here...I was unable to upload the pic...so.. I will give the transition table of the problem. (S/I)....a...b.....c.......e(elipson) p>.......{p}.....{q}...{r} ..¤(phi) q>.......{q} ....{r} ..¤.... {p}…
-2
votes
2 answers

Java Estimating Double's Representation Error

Every now and then I see some rounding errors which are caused by floor'ing some values as shown in the two examples below. // floor(number, precision) double balance = floor(0.7/0.1, 3) // = 6.999 double balance = floor(0.7*0.1, 3) // =…
Mattx
  • 65
  • 6
-2
votes
1 answer

C# tracking precision and accumulated rounding error in number types

I am writing some code to do some math (for a research project) I am not sure what level of precision I am going to need, or how much of a difference rounding errors could introduce in my results. For example one thing I want to do is calculate the…
user802599
  • 787
  • 2
  • 12
  • 35
-3
votes
1 answer

How is the logic reasoning done in these three codes?

def findRoot1(x, power, epsilon): low = 0 high = x ans = (high+low)/2.0 while abs(ans**power - x) > epsilon: if ans**power < x: low = ans else: high = ans ans = (high+low)/2.0 …
Eliza
  • 101
  • 1
  • 1
  • 9
-4
votes
1 answer

Determine machine epsilon in fortran

How can I write a program in FORTRAN 90 that determines the machine epsilon in any computer ? type ErrorOrT[M[+_], A] = EitherT[M, Throwable, A] type ErrorOr[A] = ErrorOrT[IO, A]
1 2 3
10
11