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
possible bug -fx calc with scientific notation
Re: possible bug -fx calc with scientific notation
Right. A bug. Will have a fix within a day or two.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug -fx calc with scientific notation
Thanks. Let me know when available in the beta and I will verify it.magick wrote:Right. A bug. Will have a fix within a day or two.
Re: possible bug -fx calc with scientific notation
Try Beta now.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug -fx calc with scientific notation
The list of betas still show as 2 days old.magick wrote:Try Beta now.
ImageMagick-6.7.8-4.tar.bz2 16-Jul-2012 09:16
Re: possible bug -fx calc with scientific notation
Building now...
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug -fx calc with scientific notation
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