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
2
votes
2 answers

Assert Equals (double, double, delta) Issue

I am trying to create an assert equals (double, double, epsilon) method. I created it and for some reason when I run my tester, the method is failing. public static void assertEquals(double expect, double actual, double epsilon){ …
J. Doe
  • 57
  • 5
2
votes
1 answer

Effect of different epsilon value for Q-learning and SARSA

Since i am a beginning in this field,I am having a doubt about the effect in between how does the different epsilon value will affect the SARSA and Qlearning with the epsilon greedy algorithm for action selection. I understand that when epsilon is…
2
votes
0 answers

Machine epsilon subtraction in MATLAB

Using MATLAB: Why does 1-eps == 1-eps*4/3 return FALSE. With M mantissa bits, shouldn't eps*4/3 be 1.0101...*2^-M which will be rounded to eps when subtracted from 1?
bnorm
  • 399
  • 2
  • 16
2
votes
1 answer

Converting Epsilon-NFA to NFA

I'm having trouble understanding the process of converting an epsilon-NFA to a NFA, so I wondered if anybody could help me with it: And the answer says: The 0 in the new NFA has an A going to 1,2 and to 2. I figured this is because the 0 in the…
Steven
  • 1,123
  • 5
  • 14
  • 31
2
votes
2 answers

Epsilon in Java 1.6

I work on a product called Oracle RPAS as a consultant and the application is developed using C++. In Oracle RPAS , JNI calls can be made to custom developed Java programs to process the data. The data stored in Oracle RPAS for Real is always…
Nick
  • 59
  • 6
2
votes
2 answers

Objective C: Safe float comparison fails strangely

I wrote a piece of code and came across a really strange problem. A comparison between two floats returns NO even when the actual comparison is true. I even used safe floating point comparison by comparing to FLT_EPSILON. This is the code: //To…
JonasG
  • 9,274
  • 12
  • 59
  • 88
2
votes
3 answers

Imprecise comparison of complex objects in Java?

It is known, that double values are better if compared imprecisely, with explicit precision (epsilon). For example, two-argument assertEquals(double,double) was deprecated for this reason from jUnit. But what if we have a compound class, like…
Dims
  • 47,675
  • 117
  • 331
  • 600
2
votes
3 answers

Can I set jLabel´s text as symbols?

I have jFrame, many components there, jLabel too. I want set jLabel text not as string or through picture as icon. But as symbol (epsilon). Is that possible?
Dominika
  • 235
  • 1
  • 4
  • 14
2
votes
4 answers

Is Math.Abs(x) < double.Epsilon equivalent to Math.Abs(x) == 0d?

After a bit of light reading, this article piqued my interest: I'd have thought that yes, the two statements are equivalent, given MSDN's statement: Represents the smallest positive Double value that is greater than zero. This field is…
trilson86
  • 939
  • 1
  • 9
  • 20
2
votes
0 answers

Implementation of behavior within graphical DSL

I started writing graphic dsl in eclipse by using Epsilon. However the problem is there is that epsilon doesn't have support for writing specific behavior for dsls. For the reference, i'm writing a dsl for data flow diagrams, where i'd need to…
user1033698
  • 89
  • 1
  • 7
2
votes
7 answers

Lower Bounds For Floating Points

Are there any lower bounds for floating point types in C? Like there are lower bounds for integral types (int being at least 16 bits)?
Geekhero
  • 21
  • 2
2
votes
2 answers

What is the optimum epsilon/dx value to use within the finite difference method?

double MyClass::dx = ?????; double MyClass::f(double x) { return 3.0*x*x*x - 2.0*x*x + x - 5.0; } double MyClass::fp(double x) // derivative of f(x), that is f'(x) { return (f(x + dx) - f(x)) / dx; } When using finite difference method…
hkBattousai
  • 10,583
  • 18
  • 76
  • 124
1
vote
2 answers

float numerical error. How does c++ know 0.99999982 is 1?

I normalized a vector and length of it should be 1. But the result of length method is 0.99999982 I don't know it's right or wrong. But if I print it out, the result is 1. Not 0.99999982( printed by cout ) But how std::cout knows it's 1? [This is my…
SeniorLee
  • 805
  • 1
  • 12
  • 25
1
vote
1 answer

C++ - How to count the length of the digits after the dot in a double / float?

How to count the length of the digits after the dot in a double / float? Without std::string. So the length after the dot of 1234.5678 is 4. And how should you correctly use epsilon in such a situation? I have something like this, one version with…
user19652212
1
vote
1 answer

Using Machine Epsilon to approximate sin(x) using Taylor's Series

I am having a hard time using Machine Epsilon which is 2.220446049250313e-16,I then need to use abs error to determine if my abs value of my sine term is less than the Machine Epsilon. Write a sine function using Taylor's Series to calculate the…