Page MenuHomePhorge

test_exp_associativity.cjs
No OneTemporary

Size
339 B
Referenced Files
None
Subscribers
None

test_exp_associativity.cjs

// Test right-associativity of exponentiation
// 2 ** 3 ** 2 should be 2 ** (3 ** 2) = 2 ** 9 = 512
// NOT (2 ** 3) ** 2 = 8 ** 2 = 64
console.log('2 ** 3 ** 2 =', 2 ** 3 ** 2);
console.log('Expected: 512 (right-associative)');
console.log('(2 ** 3) ** 2 =', (2 ** 3) ** 2);
console.log('Expected: 64 (left-associative, for comparison)');

File Metadata

Mime Type
text/plain
Expires
Sun, May 3, 8:03 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
523834
Default Alt Text
test_exp_associativity.cjs (339 B)

Event Timeline