Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevfloat/nextfloat for args <= 0 #5025

Closed
nolta opened this issue Dec 3, 2013 · 1 comment
Closed

prevfloat/nextfloat for args <= 0 #5025

nolta opened this issue Dec 3, 2013 · 1 comment

Comments

@nolta
Copy link
Member

nolta commented Dec 3, 2013

julia> nextfloat(0.)
5.0e-324

julia> prevfloat(0.)
NaN

julia> z = BigFloat(0.)
0e+00 with 256 bits of precision

julia> nextfloat(z)
2.382564904887951073216169781732674520415196125559239787955023752600945386104324e-323228497 with 256 bits of precision

julia> prevfloat(z)
-2.382564904887951073216169781732674520415196125559239787955023752600945386104324e-323228497 with 256 bits of precision

julia> nextfloat(-1.)
-1.0000000000000002

julia> prevfloat(-1.)
-0.9999999999999999

julia> z = BigFloat(-1.)
-1e+00 with 256 bits of precision

julia> nextfloat(z)
-9.999999999999999999999999999999999999999999999999999999999999999999999999999914e-01 with 256 bits of precision

julia> prevfloat(z)
-1.000000000000000000000000000000000000000000000000000000000000000000000000000017e+00 with 256 bits of precision
gitfoxi pushed a commit to gitfoxi/julia that referenced this issue Dec 13, 2013
* upstream/master: (53 commits)
  edit embedding chapter
  formatting fixes
  Fix JuliaLang#5056
  more consitent/useful description of predicate in ie all()
  NEWS for JuliaLang#4042
  Add sparse matvec to perf benchmark (JuliaLang#4707)
  Use warn_once instead of warn (JuliaLang#5038)
  Use warn() instead of println in base/sprase/sparsematrix.jl
  allow scale(b,A) or scale(A,b) when b is a scalar as well as a vector, don't restrict scale unnecessarily to arrays of numbers (e.g. scaling arrays of arrays should work), and improve documentation for scale\!
  Added section about memory management
  added negative bitarray rolling
  More accurate linspace for types with greater precision than Float64
  add realmin realmax for BigFloat
  fix eps(realmax), add typemin and typemax for BigFloat
  fix JuliaLang#5025, ordering used by nextfloat/prevfloat
  roll back on errors during type definitions. fixes JuliaLang#5009
  improve method signature errors. fixes JuliaLang#5018
  update juliadoc
  add more asserts for casts
  Fix segfaulting on strstr() failure
  ...
@StefanKarpinski
Copy link
Member

Technically, this was a breaking change. It would at least be listed in NEWS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants