| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 13 matching lines...) Expand all Loading... |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 | 28 |
| 29 // Two fp numbers that have the same hash value (see TranscendentalCache | 29 // Two fp numbers that have the same hash value (see TranscendentalCache |
| 30 // in heap.h). | 30 // in heap.h). |
| 31 var x = 0x123456789ABCD / 0x2000000000000; | 31 var x = 0x123456789ABCD / 0x2000000000000; |
| 32 var y = 0x1134567899BCD / 0x2000000000000; | 32 var y = 0x1134567899BCD / 0x2000000000000; |
| 33 | 33 |
| 34 assertEquals(0.5386962702923196, Math.sin(x)); | 34 assertTrue(Math.sin(x) != Math.sin(y)); |
| 35 assertEquals(0.5121094149171027, Math.sin(y)); | |
| 36 | 35 |
| 37 assertEquals(0.8425000465122504, Math.cos(x)); | 36 assertTrue(Math.cos(x) != Math.cos(y)); |
| 38 assertEquals(0.8589202216464942, Math.cos(y)); | |
| 39 | 37 |
| 40 assertEquals(0.6394020659374369, Math.tan(x)); | 38 assertTrue(Math.tan(x) != Math.tan(y)); |
| 41 assertEquals(0.5962246574372441, Math.tan(y)); | |
| 42 | 39 |
| 43 assertEquals(-0.5640701382848059, Math.log(x)); | 40 assertTrue(Math.log(x) != Math.log(y)); |
| 44 assertEquals(-0.6205681544400349, Math.log(y)); | |
| 45 | 41 |
| 46 assertEquals(0.6051541873165459, Math.asin(x)); | 42 assertTrue(Math.asin(x) != Math.asin(y)); |
| 47 assertEquals(0.5676343396849298, Math.asin(y)); | |
| 48 | 43 |
| 49 assertEquals(0.9656421394783508, Math.acos(x)); | 44 assertTrue(Math.acos(x) != Math.acos(y)); |
| 50 assertEquals(1.0031619871099668, Math.acos(y)); | |
| 51 | 45 |
| 52 assertEquals(0.5172294898564562, Math.atan(x)); | 46 assertTrue(Math.atan(x) != Math.atan(y)); |
| 53 assertEquals(0.4933034078249788, Math.atan(y)); | |
| 54 | 47 |
| 55 assertEquals(1.7663034013841883, Math.exp(x)); | 48 assertTrue(Math.exp(x) != Math.exp(y)); |
| 56 assertEquals(1.7119599587777090, Math.exp(y)); | 49 |
| OLD | NEW |