Commit 4a34254f authored by Anastasiia's avatar Anastasiia

comment out printing inputs causing rel error max values in dynamic phase

parent 9726642b
......@@ -123,12 +123,12 @@ class ErrorMeasurerRational {
val absError = rat_abs(Rational.fromDouble(lowPrec) - highPrec)
val relError = rat_abs(absError / highPrec)
if (relError > currentRelError_Max) {
System.out.println("The changing double input is:" + inputX + " value is "+ lowPrec)
for (i <- inputR)
System.out.println("absErr:"+ absError +";Rational input is " + i._2.toFractionString + " value is " + highPrec)
}
// if (relError > currentRelError_Max) {
// System.out.println("The changing double input is:" + inputX + " value is "+ lowPrec)
// for (i <- inputR)
// System.out.println("absErr:"+ absError +";Rational input is " + i._2.toFractionString + " value is " + highPrec)
//
// }
currentAbsError_Min = rat_min(currentAbsError_Min, absError)
currentAbsError_Max = rat_max(currentAbsError_Max, absError)
currentRelError_Min = rat_min(currentRelError_Min, relError)
......@@ -146,4 +146,4 @@ class ErrorMeasurerRational {
//def avrgAbsError: Rational = (currentAbsError_Sum / Rational(n))
//def avrgRelError: Rational = (currentRelError_Sum / Rational(n))
}
\ No newline at end of file
}
......@@ -3,36 +3,38 @@ import Real._
object TimesPlusReal {
// def sumPlus2terms(u: Real): Real = {
// require(-11.633685649025693 <= u && u <= -11.633685649025693) // 100
// // maxAbsError: 2.926454093647371e-17 maxRelError: 4.6812116338827325e-12
// 0.0447 * u + 0.483292 + 0.03674
//
// }
//
// def plusSum(u: Real): Real ={
// require(-11.633685649025693 <= u && u <= -11.633685649025693)
// // maxAbsError: 7.783679826382432e-17 maxRelError: 1.2450922307913817e-11
// 0.483292 + 0.03674 + 0.0447 * u
// }
// def sumPlus2terms(u: Real): Real = {
// require(-11.633685649025693 <= u && u <= -11.633685649025693) // 100
// // maxAbsError: 2.926454093647371e-17 maxRelError: 4.6812116338827325e-12
// 0.0447 * u + 0.483292 + 0.03674
//
// }
def plusSum(u: Real): Real ={
require(-11.633685649025693 <= u && u <= -11.633685649025693)
// maxAbsError: 7.783679826382432e-17 maxRelError: 1.2450922307913817e-11
0.483292 + 0.03674 + 0.0447 * u
}
def plus2TermsSum(u: Real): Real = {
require(-11.633685649025693 <= u && u <= -11.633685649025693)
0.520032 + 0.0447 * u
}
// def sumPlus1term(u: Real): Real ={
// require(-11.633685649025693 <= u && u <= -11.633685649025693)
// // maxAbsError: 7.783679826382432e-17 maxRelError: 1.2450922307913817e-11
// maxAbsError: 7.783679826382432e-17 maxRelError: 1.2450922307913817e-11
// 0.0447 * u + 0.520032
// }
//
// def plusSum2TermsPure(u: Real, x: Real): Real = {
// require(-11.633685649025693 <= u && u <= -11.633685649025693 && 1 <= x && x<=1)
// (0.483292 + 0.03674*x ) + 0.0447 * u
// }
def plusSum2TermsPure(u: Real, x: Real): Real = {
require(-11.633685649025693 <= u && u <= -11.633685649025693
&& 1<= x && x<= 1)
0.483292 + 0.03674 * x + 0.0447 * u
}
def plusSum2TermsParenthesis(u: Real, x: Real): Real = {
require(-11.633685649025693 <= u && u <= -11.633685649025693
&& 1<= x && x<= 1)
0.483292 + (0.03674 * x + 0.0447 * u)
}
// def plusSum2TermsParenthesis(u: Real, x: Real): Real = {
// require(-11.633685649025693 <= u && u <= -11.633685649025693 && 1<=x && x<=1)
// 0.483292 + (0.03674 *x + 0.0447 * u)
// }
}
// seed = 1486647796240
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment