Jump to content

Magic constant: Difference between revisions

m
Line 547:
=={{header|J}}==
 
Implementation:<lang J>mgc=: 0 10.5 0 10.5&p. % 2:</lang>
 
In other words, the magic constant for <tt>x</tt> is the result of the polynomial <code>(0.5*x)+(0.5*x^3)</code>
 
Task examples:<lang J> mgc 3+i.20
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.