Files
scriptc/tests/corpus/2693-math-constants.ts
Chris Tate 4ac24f27e9 Expand static Math numeric lowering (#465)
* Expand static Math numeric lowering

* Update Math method-value fence snapshot

* Rebase Math fixtures onto current corpus
2026-09-26 13:51:07 -05:00

12 lines
588 B
TypeScript

// Standard Math constants remain usable in static arithmetic and number operations.
const pi = Math.PI;
const e = Math.E;
console.log(Math.E, Math.LN10, Math.LN2, Math.LOG10E, Math.LOG2E, Math.PI, Math.SQRT1_2, Math.SQRT2);
console.log(pi + e, pi - e, -pi, -e);
console.log(Math.PI * 2, Math.E * 2);
console.log(pi.toFixed(6), e.toFixed(6));
console.log(Math.PI, Math.PI, Math.E, Math.E);
console.log(Math.LN10.toFixed(12), Math.LN2.toFixed(12), Math.LOG10E.toFixed(12), Math.LOG2E.toFixed(12));
console.log(Math.SQRT1_2.toFixed(12), Math.SQRT2.toFixed(12), Math.SQRT1_2 * Math.SQRT2);