eps()

eps()

The distance between 1.0 and the next larger representable floating-point value of Float64.

Examples

julia> eps(Float64)
2.220446049250313e-16
julia> eps(Float32)
1.1920929f-7
julia> eps(BigFloat)
1.000000000000000000000000000000000000000000000000000000000000000000000000000004e-10000

The eps function returns the distance between 1.0 and the next larger representable floating-point value of the given floating-point type T.

Here are some examples of how to use the eps function with different floating-point types:

  1. Get the machine epsilon for Float64:

    julia> eps(Float64)
    2.220446049250313e-16
  2. Get the machine epsilon for Float32:

    julia> eps(Float32)
    1.1920929f-7
  3. Get the machine epsilon for BigFloat:
    julia> eps(BigFloat)
    1.000000000000000000000000000000000000000000000000000000000000000000000000000004e-10000

Please note that only floating-point types are valid arguments for the eps function.

See Also

abs2, beta, binomial, ceil, cell, cross, ctranspose, ctranspose!, cummin, cumprod, cumprod!, cumsum, cumsum!, cumsum_kbn, div, divrem, eigfact, eigfact!, eigmin, eps, erf, erfc, erfcinv, erfcx, erfi, erfinv, exp, exp10, exp2, expm1, exponent, factor, factorial, factorize, floor, gcd, invmod, log, log10, log1p, log2, logspace, max, min, mod, mod1, modf, next, nextpow, nextprod, num, primes, primesmask, prod, realmin, sqrt, sum!, sumabs, sumabs!, sumabs2, sumabs2!,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: