What is really strange is when I print the following lines, I obtain 2048: current := LibC uniqueInstance fegetround. LibC uniqueInstance fesetround: 2048. LibC uniqueInstance fegetround. and 0 when I remove the first line : LibC uniqueInstance fesetround: 2048. LibC uniqueInstance fegetround. On Thu, May 24, 2018 at 10:37 AM Serge Stinckwich < serge.stinckwich@gmail.com> wrote:
On Thu, May 24, 2018 at 10:31 AM Steffen Märcker <merkste@web.de> wrote:
I actually made progress: It works like a charm! Basically, I implemented the same code as you. Testing is straightforward (using the constant values from libc):
current := LibC fegetround. LibC fesetround: FE_DOWNWARDS. v1 := 1.0/10.0. LibC feesetround: FE_UPWARDS. v2 := 1.0/10.0. LibC feesetround: current. v1 < v2. "true"
âbut apparently nothing happens when you do : LibC uniqueInstance fesetround: 1024. LibC uniqueInstance fegetround. always return 0.â
This is expected, since the fesetround function returns 0 only if the set operation was successful.
âI was talking about fgetround function. â Can you check the value returns by your fegetround function ?â
Constants values are not dependent of the platform ?â
âCan you commit yr code to Pharo 7.0 or if there is no interest for this to PolyMath ?â âThank you.â -- Serge Stinckwich UMI UMMISCO 209 (SU/IRD/UY1) "Programs must be written for people to read, and only incidentally for machines to execute."http://www.doesnotunderstand.org/
-- Serge Stinckwich UMI UMMISCO 209 (SU/IRD/UY1) "Programs must be written for people to read, and only incidentally for machines to execute."http://www.doesnotunderstand.org/