nraonrao
 
NRAO Home > CASA > CasaRef
quanta.sqrt - Function

1.4.1 square root of quantity
Description

sqrt gives square root of quantity with only even powered dimensions

Arguments





Inputs

v

dimensionless quantity

allowed:

any

Default:

variant

Returns
record

Example

"""  
#  
print "\t----\t sqrt Ex 1 \t----"  
print qa.sqrt(’2m2’)  
#{’value’: 1.4142135623730951, ’unit’: ’m’}  
try:  
  print qa.sqrt(’2s’)  
except Exception, e:  
  print "Caught an expected exception", e  
#Caught an expected exception UnitVal::UnitVal Illegal unit dimensions for root  
#  
"""

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search

Updated daily during alpha development.