Skip to content

Commit 2430cd9

Browse files
committed
Formatted using ant format-source
1 parent e660303 commit 2430cd9

5 files changed

+14
-16
lines changed

src/org/sosy_lab/java_smt/api/FloatingPointFormulaManager.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
package org.sosy_lab.java_smt.api;
1010

11-
import com.microsoft.z3.Native;
1211
import java.math.BigDecimal;
1312
import org.sosy_lab.common.rationals.Rational;
1413
import org.sosy_lab.java_smt.api.FormulaType.FloatingPointType;
@@ -203,11 +202,10 @@ FloatingPointFormula multiply(
203202
FloatingPointRoundingMode pFloatingPointRoundingMode);
204203

205204
/**
206-
* remainder: x - y * n, where n in Z is nearest to x/y
205+
* remainder: x - y * n, where n in Z is nearest to x/y. Can be negative even or two positive
206+
* arguments (as opposed to integer modulo operators)
207207
*/
208-
FloatingPointFormula remainder(
209-
FloatingPointFormula number1,
210-
FloatingPointFormula number2);
208+
FloatingPointFormula remainder(FloatingPointFormula number1, FloatingPointFormula number2);
211209

212210
// ----------------- Numeric relations, return type BooleanFormula -----------------
213211

src/org/sosy_lab/java_smt/basicimpl/AbstractFloatingPointFormulaManager.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,7 @@ protected abstract TFormulaInfo multiply(
376376

377377
@Override
378378
public FloatingPointFormula remainder(
379-
FloatingPointFormula number1,
380-
FloatingPointFormula number2) {
379+
FloatingPointFormula number1, FloatingPointFormula number2) {
381380
return wrap(remainder(extractInfo(number1), extractInfo(number2)));
382381
}
383382

src/org/sosy_lab/java_smt/delegate/statistics/StatisticsFloatingPointFormulaManager.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ public FloatingPointFormula multiply(
265265

266266
@Override
267267
public FloatingPointFormula remainder(
268-
FloatingPointFormula number1,
269-
FloatingPointFormula number2) {
268+
FloatingPointFormula number1, FloatingPointFormula number2) {
270269
stats.fpOperations.getAndIncrement();
271270
return delegate.remainder(number1, number2);
272271
}

src/org/sosy_lab/java_smt/delegate/synchronize/SynchronizedFloatingPointFormulaManager.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ public FloatingPointFormula multiply(
299299

300300
@Override
301301
public FloatingPointFormula remainder(
302-
FloatingPointFormula number1,
303-
FloatingPointFormula number2) {
302+
FloatingPointFormula number1, FloatingPointFormula number2) {
304303
synchronized (sync) {
305304
return delegate.remainder(number1, number2);
306305
}

src/org/sosy_lab/java_smt/test/FloatingPointFormulaManagerTest.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ public void fpremNormal() throws SolverException, InterruptedException {
204204
.that(solver == Solvers.MATHSAT5)
205205
.isFalse();
206206

207-
for (FloatingPointType prec : new FloatingPointType[]{singlePrecType, doublePrecType,
208-
FormulaType.getFloatingPointType(5, 6)}) {
207+
for (FloatingPointType prec :
208+
new FloatingPointType[] {
209+
singlePrecType, doublePrecType, FormulaType.getFloatingPointType(5, 6)
210+
}) {
209211

210212
final FloatingPointFormula five = fpmgr.makeNumber(5, prec);
211213
final FloatingPointFormula four = fpmgr.makeNumber(4, prec);
@@ -229,8 +231,10 @@ public void fpremSpecial() throws SolverException, InterruptedException {
229231
.that(solver == Solvers.MATHSAT5)
230232
.isFalse();
231233

232-
for (FloatingPointType prec : new FloatingPointType[]{singlePrecType, doublePrecType,
233-
FormulaType.getFloatingPointType(5, 6)}) {
234+
for (FloatingPointType prec :
235+
new FloatingPointType[] {
236+
singlePrecType, doublePrecType, FormulaType.getFloatingPointType(5, 6)
237+
}) {
234238

235239
final FloatingPointFormula num = fpmgr.makeNumber(42, prec);
236240

@@ -242,7 +246,6 @@ public void fpremSpecial() throws SolverException, InterruptedException {
242246
final FloatingPointFormula minusZero = fpmgr.makeNumber("0", prec);
243247
final FloatingPointFormula minusInf = fpmgr.makeMinusInfinity(prec);
244248

245-
246249
final FloatingPointFormula expr1 = fpmgr.remainder(nan, nan);
247250
final FloatingPointFormula expr2 = fpmgr.remainder(zero, zero);
248251
final FloatingPointFormula expr3 = fpmgr.remainder(inf, inf);

0 commit comments

Comments
 (0)