Skip to content

Commit

Permalink
Add method Quadrple Quadruple.abs()
Browse files Browse the repository at this point in the history
New version: v1.1.0
  • Loading branch information
m-vokhm committed Jun 21, 2021
1 parent eaef5bc commit 1fa0fbc
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 92 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.mvohm.quadruple</groupId>
<artifactId>Quadruple</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
<name>Quadruple, 128-bit floating-point arithmetics</name>
<url>https://github.com/m-vokhm/Quadruple</url>
<description>128-bit floating-point arithmetics</description>
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/mvohm/quadruple/Quadruple.java
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ public Quadruple assign(long[] value) {
return this;
} // public Quadruple assign(long[] value) {


/**
* Assigns the value of a IEEE-754 quadruple value passed in as an array
* of two {@code long}s containing the 128 bits of the IEEE-754 quadruple to the given instance.<br>
Expand Down Expand Up @@ -1746,6 +1745,15 @@ public Quadruple negate() {
return this;
} // public Quadruple negate() {

/**
* Returns a new instance of {@code Quadruple} with the value of the absolute value of this instance
* @return a new instance of {@code Quadruple} with the value of the absolute value of this instance
*/
public Quadruple abs() {
return new Quadruple(exponent, mantHi, mantLo);
} // public Quadruple abs() {


/**
* Returns 1 for positive values, -1 for negative values (including -0), and 0 for the positive zero value
* @return 1 for positive values, -1 for negative values (including -0), and 0 for the positive zero value
Expand Down
Loading

0 comments on commit 1fa0fbc

Please sign in to comment.