JS Built-ins
← Math17 / 215
MathLOG2Eintermediate

Math.LOG2E β€” equals 1/Math.LN2

πŸ“– Usage Example
// Base-2 logarithm of e
Math.LOG2E   // β†’ 1.4426950408...
// Equivalent to: 1 / Math.LN2

Use Math.LOG2E as a precomputed constant for converting natural log values to base-2 logarithms.

Math.LOG2E

Math.LOG2E is the reciprocal of Math.LN2: LOG2E = 1 / LN2.

Challenge: Verify that 1/Math.LN2 β‰ˆ Math.LOG2E.

πŸ’‘ Hints (2)
  • β€’ LOG2E = 1 / LN2 by the change of base formula.
  • β€’ Both sides represent logβ‚‚(e).