nextafter

WebJar for nextafter

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

nextafter
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

nextafter
WebJar for nextafter
Project URL

Project URL

http://webjars.org

Download nextafter

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/nextafter/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>nextafter</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/nextafter/
implementation 'org.webjars.npm:nextafter:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/nextafter/
implementation ("org.webjars.npm:nextafter:1.0.0")
'org.webjars.npm:nextafter:jar:1.0.0'
<dependency org="org.webjars.npm" name="nextafter" rev="1.0.0">
  <artifact name="nextafter" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='nextafter', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "nextafter" % "1.0.0"
[org.webjars.npm/nextafter "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : double-bits jar [1.1.0,2)

Project Modules

There are no modules declared in this project.

nextafter

Returns the next floating point number after any given number in the direction of some other floating point number. (Like the C standard library function).

testling badge

build status

Example

var nextafter = require("nextafter")

var x = 0.1
console.log("The number", x, "is between", nextafter(x, -Infinity), "and", nextafter(x, Infinity))

Output:

The number 0.1 is between 0.09999999999999999 and 0.10000000000000002

Install

npm install nextafter

API

require("nextafter")(from, to)

Returns the floating point number closest to from in the direction on of to

  • If from === to, then returns from
  • If from < to, then returns next representable float after from
  • If from > to, then returns the floating point nubmer immediately before from

Credits

(c) 2014 Mikola Lysenko. MIT License

org.webjars.npm

Versions

Version
1.0.0