| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 assertEquals(+Infinity, 1/Math.pow(-0, 0.5)); | 129 assertEquals(+Infinity, 1/Math.pow(-0, 0.5)); |
| 130 assertEquals(+Infinity, 1/Math.pow(-0, 0.6)); | 130 assertEquals(+Infinity, 1/Math.pow(-0, 0.6)); |
| 131 assertEquals(-Infinity, 1/Math.pow(-0, 1)); | 131 assertEquals(-Infinity, 1/Math.pow(-0, 1)); |
| 132 assertEquals(-Infinity, 1/Math.pow(-0, 10000000001)); | 132 assertEquals(-Infinity, 1/Math.pow(-0, 10000000001)); |
| 133 | 133 |
| 134 assertEquals(+Infinity, Math.pow(-0, -0.5)); | 134 assertEquals(+Infinity, Math.pow(-0, -0.5)); |
| 135 assertEquals(+Infinity, Math.pow(-0, -0.6)); | 135 assertEquals(+Infinity, Math.pow(-0, -0.6)); |
| 136 assertEquals(-Infinity, Math.pow(-0, -1)); | 136 assertEquals(-Infinity, Math.pow(-0, -1)); |
| 137 assertEquals(-Infinity, Math.pow(-0, -10000000001)); | 137 assertEquals(-Infinity, Math.pow(-0, -10000000001)); |
| 138 |
| 139 assertEquals(4, Math.pow(16, 0.5)); |
| 140 assertEquals(NaN, Math.pow(-16, 0.5)); |
| 141 assertEquals(0.25, Math.pow(16, -0.5)); |
| 142 assertEquals(NaN, Math.pow(-16, -0.5)); |
| 138 | 143 |
| 139 // Tests from Sputnik S8.5_A13_T1. | 144 // Tests from Sputnik S8.5_A13_T1. |
| 140 assertTrue( | 145 assertTrue( |
| 141 (1*((Math.pow(2,53))-1)*(Math.pow(2,-1074))) === 4.4501477170144023e-308); | 146 (1*((Math.pow(2,53))-1)*(Math.pow(2,-1074))) === 4.4501477170144023e-308); |
| 142 assertTrue( | 147 assertTrue( |
| 143 (1*(Math.pow(2,52))*(Math.pow(2,-1074))) === 2.2250738585072014e-308); | 148 (1*(Math.pow(2,52))*(Math.pow(2,-1074))) === 2.2250738585072014e-308); |
| 144 assertTrue( | 149 assertTrue( |
| 145 (-1*(Math.pow(2,52))*(Math.pow(2,-1074))) === -2.2250738585072014e-308); | 150 (-1*(Math.pow(2,52))*(Math.pow(2,-1074))) === -2.2250738585072014e-308); |
| 146 } | 151 } |
| 147 | 152 |
| 148 test(); | 153 test(); |
| 149 test(); | 154 test(); |
| 150 %OptimizeFunctionOnNextCall(test); | 155 %OptimizeFunctionOnNextCall(test); |
| 151 test(); | 156 test(); |
| OLD | NEW |