For Programmers: Free Programming Magazines  


Home > Archive > APL > May 2006 > Sounds dumb, but how do you do a square root.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sounds dumb, but how do you do a square root.
MJMNYR96@gmail.com

2006-05-07, 6:59 pm

This sounds like a dumb question in such a powerfull math programming
language, and I'm thinking there has to be a way to do it. How do you
perform square root. I'm using APL2C, and there is no square
root/radical symbol, and I cant find any type of keywords either.
Thanks again

Mike Kent

2006-05-07, 6:59 pm

MJMNYR96@gmail.com wrote:
> This sounds like a dumb question in such a powerfull math programming
> language, and I'm thinking there has to be a way to do it. How do you
> perform square root. I'm using APL2C, and there is no square
> root/radical symbol, and I cant find any type of keywords either.
> Thanks again



Raise x to the power 0.5:

x*0.5
MJMNYR96@gmail.com

2006-05-07, 6:59 pm

Thanks. I just found that. Never even thought of doing it like that.
Used to typing some keyword in. Thanks though.

David Liebtag

2006-05-07, 6:59 pm

Raise the number to the .5 power.

4*.5
2


Bob Armstrong

2006-05-12, 6:57 pm

I always like x * % 2

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com