View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

calulate…

Andrea Cardullo wrote on Jun 20, 2007

Hi, do someone know if, and how, we can make basic operation like sum, division and so on, simply with numbers?
Like a calculator, ex (4861/5000 -1)*299793

Mike Fitzpatrick wrote on Jun 20, 2007

You mean in the CL? Simple, just prepend the expression with an '=', e.g.

cl> = (4861/5000 -1)*299793
-299793


Note you'll need to be explicit about using floating-point numbers (calculations are done internally as double precision. FWIW, you can use the same trick to evaluate sexigesimal values as well:

cl> = 12:34:56.7
12.582416666667


Remember to multiply RA by 15 8-)

-Mike

Last post on Jun 20, 2007