Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4499557
test_exp_associativity.cjs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
339 B
Referenced Files
None
Subscribers
None
test_exp_associativity.cjs
View Options
// 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
Details
Attached
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)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment