Mathematica, Greg Martin Greg Martin
f[y_]:=With[{x=
#&@@{#(#)#^(1/(1+1))&@y,#&@@@{1^(1),-1}}
},Print[#,".",IntegerString[Round@#2,10,3]]&@@QuotientRemainder[1000x,1000]]
Thanks for leaving the rounding stuff intact!
Explanation: #(#)#^(1/(1+1))&@y does the main work of multiplying y squared, aka y(y), and y's square root, y^(1/(1+1)). The #&@@@{1^(1),-1} bit is just junk to use up the other letters, and #&@@ picks out the useful bit from the junk.
Mathematica, Greg Martin
f[y_]:=With[{x=
#&@@{#(#)#^(1/(1+1))&@y,#&@@@{1^(1),-1}}
},Print[#,".",IntegerString[Round@#2,10,3]]&@@QuotientRemainder[1000x,1000]]
Thanks for leaving the rounding stuff intact!
Explanation: #(#)#^(1/(1+1))&@y does the main work of multiplying y squared, aka y(y), and y's square root, y^(1/(1+1)). The #&@@@{1^(1),-1} bit is just junk to use up the other letters, and #&@@ picks out the useful bit from the junk.
Mathematica, Greg Martin
f[y_]:=With[{x=
#&@@{#(#)#^(1/(1+1))&@y,#&@@@{1^(1),-1}}
},Print[#,".",IntegerString[Round@#2,10,3]]&@@QuotientRemainder[1000x,1000]]
Thanks for leaving the rounding stuff intact!
Explanation: #(#)#^(1/(1+1))&@y does the main work of multiplying y squared, aka y(y), and y's square root, y^(1/(1+1)). The #&@@@{1^(1),-1} bit is just junk to use up the other letters, and #&@@ picks out the useful bit from the junk.
Mathematica, Greg Martin
f[y_]:=With[{x=
#&@@{#(#)#^(1/(1+1))&@y,#&@@@{1^(1),-1}}
},Print[#,".",IntegerString[Round@#2,10,3]]&@@QuotientRemainder[1000x,1000]]
Thanks for leaving the rounding stuff intact!
Explanation: #(#)#^(1/(1+1))&@y does the main work of multiplying y squared, aka y(y), and y's square root, y^(1/(1+1)). The #&@@@{1^(1),-1} bit is just junk to use up the other letters, and #&@@ picks out the useful bit from the junk.