Page 1 of 1

possible bug -fx calc with scientific notation

Posted: 2012-07-17T15:46:50-07:00
by fmw42
IM 6.7.8.2 Q16 Mac OSX Snow Leopard

The following fx calculation does not seem to working with scientific notation. Correct me if I am wrong, but this was fixed some time ago. I assume it got lost somewhere along the way.

2011-05-21 6.7.0-0 Cristy <quetzlzacatenango@image...>
...
Fix -fx to interpret scientific notation properly.


val=2.44141e-05
convert xc: -format "%[fx:round(255*$val)]" info:
311

Should round to zero, right?

convert xc: -format "%[fx:round(255*2.44141e-05)]" info:
311

Re: possible bug -fx calc with scientific notation

Posted: 2012-07-17T17:46:58-07:00
by magick
Right. A bug. Will have a fix within a day or two.

Re: possible bug -fx calc with scientific notation

Posted: 2012-07-17T18:03:09-07:00
by fmw42
magick wrote:Right. A bug. Will have a fix within a day or two.
Thanks. Let me know when available in the beta and I will verify it.

Re: possible bug -fx calc with scientific notation

Posted: 2012-07-18T04:14:12-07:00
by magick
Try Beta now.

Re: possible bug -fx calc with scientific notation

Posted: 2012-07-18T09:07:59-07:00
by fmw42
magick wrote:Try Beta now.
The list of betas still show as 2 days old.

ImageMagick-6.7.8-4.tar.bz2 16-Jul-2012 09:16

Re: possible bug -fx calc with scientific notation

Posted: 2012-07-18T10:00:58-07:00
by magick
Building now...

Re: possible bug -fx calc with scientific notation

Posted: 2012-07-18T12:42:08-07:00
by fmw42
magick wrote:Building now...

Thanks. It is fixed in IM 6.7.8.4 Q16 beta:


This works again.

imb convert xc: -format "%[fx:round(255*2.44141e-05)]" info:
0


This also works:

imb convert xc: -precision 10 -format "%[fx:1e+6]" info:
1000000