commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r857590 [45/48] - in /websites/production/commons/content/proper/commons-math/xref-test: ./ org/apache/commons/math3/ org/apache/commons/math3/analysis/ org/apache/commons/math3/analysis/differentiation/ org/apache/commons/math3/analysis/fu...
Date Sun, 07 Apr 2013 07:52:13 GMT
Modified: websites/production/commons/content/proper/commons-math/xref-test/org/apache/commons/math3/util/FastMathTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/xref-test/org/apache/commons/math3/util/FastMathTest.html
(original)
+++ websites/production/commons/content/proper/commons-math/xref-test/org/apache/commons/math3/util/FastMathTest.html
Sun Apr  7 07:52:05 2013
@@ -1159,32 +1159,40 @@
 <a class="jxr_linenumber" name="1149" href="#1149">1149</a>         <strong
class="jxr_keyword">double</strong> delta = 0.0;
 <a class="jxr_linenumber" name="1150" href="#1150">1150</a>         Assert.assertEquals(1.0,
FastMath.copySign(1d, 2.0), delta);
 <a class="jxr_linenumber" name="1151" href="#1151">1151</a>         Assert.assertEquals(1.0,
FastMath.copySign(1d, 0.0), delta);
-<a class="jxr_linenumber" name="1152" href="#1152">1152</a>         Assert.assertEquals(-1.0,
FastMath.copySign(1d, -2.0), delta);
-<a class="jxr_linenumber" name="1153" href="#1153">1153</a>     }
-<a class="jxr_linenumber" name="1154" href="#1154">1154</a> 
-<a class="jxr_linenumber" name="1155" href="#1155">1155</a>     @Test
-<a class="jxr_linenumber" name="1156" href="#1156">1156</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> testIndicatorFloat() {
-<a class="jxr_linenumber" name="1157" href="#1157">1157</a>         <strong
class="jxr_keyword">float</strong> delta = 0.0F;
-<a class="jxr_linenumber" name="1158" href="#1158">1158</a>         Assert.assertEquals(1.0F,
FastMath.copySign(1d, 2.0F), delta);
-<a class="jxr_linenumber" name="1159" href="#1159">1159</a>         Assert.assertEquals(1.0F,
FastMath.copySign(1d, 0.0F), delta);
-<a class="jxr_linenumber" name="1160" href="#1160">1160</a>         Assert.assertEquals(-1.0F,
FastMath.copySign(1d, -2.0F), delta);
-<a class="jxr_linenumber" name="1161" href="#1161">1161</a>     }
-<a class="jxr_linenumber" name="1162" href="#1162">1162</a> 
-<a class="jxr_linenumber" name="1163" href="#1163">1163</a>     @Test
-<a class="jxr_linenumber" name="1164" href="#1164">1164</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> testIntPow() {
-<a class="jxr_linenumber" name="1165" href="#1165">1165</a>         <strong
class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong>
maxExp = 300;
-<a class="jxr_linenumber" name="1166" href="#1166">1166</a>         DfpField
field = <strong class="jxr_keyword">new</strong> DfpField(40);
-<a class="jxr_linenumber" name="1167" href="#1167">1167</a>         <strong
class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>
base = 1.23456789;
-<a class="jxr_linenumber" name="1168" href="#1168">1168</a>         Dfp baseDfp
= field.newDfp(base);
-<a class="jxr_linenumber" name="1169" href="#1169">1169</a>         Dfp dfpPower
= field.getOne();
-<a class="jxr_linenumber" name="1170" href="#1170">1170</a>         <strong
class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong>
i = 0; i &lt; maxExp; i++) {
-<a class="jxr_linenumber" name="1171" href="#1171">1171</a>             Assert.assertEquals(<span
class="jxr_string">"exp="</span> + i, dfpPower.toDouble(), FastMath.pow(base, i),
-<a class="jxr_linenumber" name="1172" href="#1172">1172</a>                 
               0.6 * FastMath.ulp(dfpPower.toDouble()));
-<a class="jxr_linenumber" name="1173" href="#1173">1173</a>             dfpPower
= dfpPower.multiply(baseDfp);
-<a class="jxr_linenumber" name="1174" href="#1174">1174</a>         }
-<a class="jxr_linenumber" name="1175" href="#1175">1175</a>     }
-<a class="jxr_linenumber" name="1176" href="#1176">1176</a> 
-<a class="jxr_linenumber" name="1177" href="#1177">1177</a> }
+<a class="jxr_linenumber" name="1152" href="#1152">1152</a>         Assert.assertEquals(-1.0,
FastMath.copySign(1d, -0.0), delta);
+<a class="jxr_linenumber" name="1153" href="#1153">1153</a>         Assert.assertEquals(1.0,
FastMath.copySign(1d, Double.POSITIVE_INFINITY), delta);
+<a class="jxr_linenumber" name="1154" href="#1154">1154</a>         Assert.assertEquals(-1.0,
FastMath.copySign(1d, Double.NEGATIVE_INFINITY), delta);
+<a class="jxr_linenumber" name="1155" href="#1155">1155</a>         Assert.assertEquals(1.0,
FastMath.copySign(1d, Double.NaN), delta);
+<a class="jxr_linenumber" name="1156" href="#1156">1156</a>         Assert.assertEquals(-1.0,
FastMath.copySign(1d, -2.0), delta);
+<a class="jxr_linenumber" name="1157" href="#1157">1157</a>     }
+<a class="jxr_linenumber" name="1158" href="#1158">1158</a> 
+<a class="jxr_linenumber" name="1159" href="#1159">1159</a>     @Test
+<a class="jxr_linenumber" name="1160" href="#1160">1160</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> testIndicatorFloat() {
+<a class="jxr_linenumber" name="1161" href="#1161">1161</a>         <strong
class="jxr_keyword">float</strong> delta = 0.0F;
+<a class="jxr_linenumber" name="1162" href="#1162">1162</a>         Assert.assertEquals(1.0F,
FastMath.copySign(1d, 2.0F), delta);
+<a class="jxr_linenumber" name="1163" href="#1163">1163</a>         Assert.assertEquals(1.0F,
FastMath.copySign(1d, 0.0F), delta);
+<a class="jxr_linenumber" name="1164" href="#1164">1164</a>         Assert.assertEquals(-1.0F,
FastMath.copySign(1d, -0.0F), delta);
+<a class="jxr_linenumber" name="1165" href="#1165">1165</a>         Assert.assertEquals(1.0F,
FastMath.copySign(1d, Float.POSITIVE_INFINITY), delta);
+<a class="jxr_linenumber" name="1166" href="#1166">1166</a>         Assert.assertEquals(-1.0F,
FastMath.copySign(1d, Float.NEGATIVE_INFINITY), delta);
+<a class="jxr_linenumber" name="1167" href="#1167">1167</a>         Assert.assertEquals(1.0F,
FastMath.copySign(1d, Float.NaN), delta);
+<a class="jxr_linenumber" name="1168" href="#1168">1168</a>         Assert.assertEquals(-1.0F,
FastMath.copySign(1d, -2.0F), delta);
+<a class="jxr_linenumber" name="1169" href="#1169">1169</a>     }
+<a class="jxr_linenumber" name="1170" href="#1170">1170</a> 
+<a class="jxr_linenumber" name="1171" href="#1171">1171</a>     @Test
+<a class="jxr_linenumber" name="1172" href="#1172">1172</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> testIntPow() {
+<a class="jxr_linenumber" name="1173" href="#1173">1173</a>         <strong
class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong>
maxExp = 300;
+<a class="jxr_linenumber" name="1174" href="#1174">1174</a>         DfpField
field = <strong class="jxr_keyword">new</strong> DfpField(40);
+<a class="jxr_linenumber" name="1175" href="#1175">1175</a>         <strong
class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>
base = 1.23456789;
+<a class="jxr_linenumber" name="1176" href="#1176">1176</a>         Dfp baseDfp
= field.newDfp(base);
+<a class="jxr_linenumber" name="1177" href="#1177">1177</a>         Dfp dfpPower
= field.getOne();
+<a class="jxr_linenumber" name="1178" href="#1178">1178</a>         <strong
class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong>
i = 0; i &lt; maxExp; i++) {
+<a class="jxr_linenumber" name="1179" href="#1179">1179</a>             Assert.assertEquals(<span
class="jxr_string">"exp="</span> + i, dfpPower.toDouble(), FastMath.pow(base, i),
+<a class="jxr_linenumber" name="1180" href="#1180">1180</a>                 
               0.6 * FastMath.ulp(dfpPower.toDouble()));
+<a class="jxr_linenumber" name="1181" href="#1181">1181</a>             dfpPower
= dfpPower.multiply(baseDfp);
+<a class="jxr_linenumber" name="1182" href="#1182">1182</a>         }
+<a class="jxr_linenumber" name="1183" href="#1183">1183</a>     }
+<a class="jxr_linenumber" name="1184" href="#1184">1184</a> 
+<a class="jxr_linenumber" name="1185" href="#1185">1185</a> }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
 </html>



Mime
View raw message