legal? safe?

jbm's icon

Since Atom doesn't have a getDouble() method, can I safely use getFLoat()? It compiles, but I'm just wondering whether there's any good reason not to do this:

double short_val = short_peak_val[1].getFloat();

thanks,

J.

nick rothwell | project cassiel's icon

Coercing an Atom's float to a double is a widening conversion, so
it's fine. Be careful when going the other way, though.

nick rothwell -- composition, systems, performance -- http://
www.cassiel.com