Skip to content

Commit

Permalink
Showing 3 changed files with 20 additions and 14 deletions.
7 changes: 0 additions & 7 deletions spec/truffle/tags/core/float/next_float_tags.txt

This file was deleted.

7 changes: 0 additions & 7 deletions spec/truffle/tags/core/float/prev_float_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -605,6 +605,26 @@ public boolean nan(double value) {

}

@CoreMethod(names = "next_float")
public abstract static class NextFloatNode extends CoreMethodArrayArgumentsNode {

@Specialization
public double nextFloat(double value) {
return Math.nextAfter(value, Double.POSITIVE_INFINITY);
}

}

@CoreMethod(names = "prev_float")
public abstract static class PrevFloatNode extends CoreMethodArrayArgumentsNode {

@Specialization
public double prevFloat(double value) {
return Math.nextAfter(value, Double.NEGATIVE_INFINITY);
}

}

@CoreMethod(names = "round", optional = 1)
public abstract static class RoundNode extends CoreMethodArrayArgumentsNode {

2 comments on commit d55ae5f

@eregon
Copy link
Member

@eregon eregon commented on d55ae5f Jul 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using nextUp/nextDown?

@bjfish
Copy link
Contributor

@bjfish bjfish commented on d55ae5f Jul 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eregon Thanks, fixed at b93ebce

Please sign in to comment.