bug with decimalPlaces?

From: Kerrie Geil <kgeil_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 02 2011 - 16:51:38 MDT

I can't seem to get decimalPlaces to truncate using ncl 6.0.

test=decimalPlaces(-0.774,1,False)
print(test)
above yields -0.8

test=decimalPlaces(0.774,1,False)
print(test)
above yields 0.8

Passing the argument "False" should result in truncation which should yield
+/- 0.7, but the function seems to be rounding instead of truncating. Same
results as above if I pass "True" for rounding.

Is this an error on my part or a bug? If it is a bug, is there another
function I can use to truncate to one decimal place?

Thanks,

Kerrie Geil

Master's Student
Department of Atmospheric Sciences
University of Arizona
PAS Building Rm 526
1118 E 4th Street
Tucson, AZ 85721

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 2 16:51:46 2011

This archive was generated by hypermail 2.1.8 : Fri Nov 04 2011 - 08:43:41 MDT