Ok, if I add 'use integer;' or 'use bigint;' (in both cases the behavior here is the same) to the test script and then run it on my Intel PC with Linux, I get the following output:
12.00
16.00
192
While the Mac M1 user gets:
12.99
16.25
192
Basically on the Mac M1 only in the last 'eval' (the one with the multiplication of the previous two values) the decimals get ignored, they don't get ignored everywhere and that's what makes this problem so strange, if he had some env setting that forces integer then all values would be integer like in my test that I just did with 'use integer;'.
I don't think it's a fundamental Mac M1 problem either, but I'm suspecting that maybe Perl and/or the Perl-Tk module from MacPorts for the M1 cpu have been compiled with some incorrect flags that cause this behaviour.
That's why I was hoping that maybe somebody else here can reproduce the issue on a M1 or M2 Mac with the test script.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.