Administrator
|
3.0/0.0 when evaluated under Windows in VA Smalltalk 9.1 throws a ZeroDivide exception. 3.0/0.0 when evaluated under Linux in VA Smalltalk 9.1 (32-bit) answers +Inf. I'm wondering about the explanation of this different behaviour and whether it is controllable. That is, whether one can choose to get an error or choose to get +Inf, and how to control it if so. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/1c19feb7-d3f3-437e-b30a-2e7d5797df93%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
I like +INF. Just out of curiosity, what happens with these? -1.0 / 0.0 -1.0 / -0.0 1.0 / -0.0 0.0 / 0.0 0.0 / -0.0 -0.0 / 0.0 -0.0 / -0.0 Similarly, what happens with +, ×, and -, when operating with 0.0 and -0.0? For instance: 0.0 - 0.0 0.0 - -0.0 -0.0 - 0.0 -0.0 - -0.0 Andres. On Tue, Jun 25, 2019, 19:30 Richard Sargent <[hidden email]> wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAPA5R7%3D7zCgB0cCpVg%2BtzK4ExaBtJBcAwvLmCoTukXNUVcZfYw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
In reply to this post by Richard Sargent
On Tuesday, June 25, 2019 at 3:30:08 PM UTC-7, Richard Sargent wrote:
--
Probably related, creating a signalling NaN and using it in an arithmetic expression throws an error under Windows but answers a quiet NaN under Linux. e.g. | aFloat | aFloat := self basicNew: 8. System bigEndian ifTrue: [1 to: 8 do: [ :i | aFloat at: i put: (#[127 247 255 255 255 255 255 255] at: i)]] ifFalse: [1 to: 8 do: [ :i | aFloat at: i put: (#[255 255 255 255 255 255 247 127] at: i)]]. ^aFloat * 2.0 You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/2233aad5-75d4-4345-ae91-9e34b978e064%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
In reply to this post by Andres Valloud-5
On Tuesday, June 25, 2019 at 4:31:38 PM UTC-7, Andres Valloud wrote:
--
Good question. I decided to answer it for all the special floats, including both zeros, and all four arithmetic operations. I've attached the PDF result and an Open Office spread sheet with the results. The cases that failed all yielded essentially the same error, differing only in which operation encountered the error. Primitive failed in: Float>>#/ due to Unknown floating point exception
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/7885ae90-1388-4540-b7a8-7e6a6f5f03d7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. Special Float Operations.pdf (66K) Download Attachment Special Float Operations.ods (25K) Download Attachment |
Administrator
|
And for those who want to conduct the test for themselves, here is the script. You will need to modify it if you are going to run it on a big endian machine. On Wednesday, June 26, 2019 at 2:00:15 PM UTC-7, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/5c54a56a-82c6-4f54-860a-d5c191b9c07c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. Special Float Operations Script.st (1K) Download Attachment |
Thanks Richard for your fantastic detective work! From what I can see the only missing part of the whole picture is 8.6.3 on Linux. I will run that, fill it into the spreadsheet and share this with the VM team for analysis. Once again, thanks both, Andres and Richard for the great report. On Wed, Jun 26, 2019 at 6:04 PM Richard Sargent <[hidden email]> wrote:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: https://marianopeck.wordpress.com/You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibG_Y__vrLROPZSiKot-d_BBgSDQdWWTMgBZmOW_BQeAsw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. |
Hi Richard, I run your code in Linux 8.6.3 and I added into the spreadsheet. But then, I realized that the permutations you are trying (while very valuable and helpful to compare) are not still covering the ORIGINAL case you reported: 3.0/0.0 Neither the subset followed by Andres like those: -1.0 / 0.0 -1.0 / -0.0 1.0 / -0.0 Right? What do you think its the best way to update your script to also include those? Because I am not sure that adding a 1.0 and -1.0 in the "special" dict is the best path. Thoughts? Thanks, On Thu, Jun 27, 2019 at 1:28 PM Mariano Martinez Peck <[hidden email]> wrote:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: https://marianopeck.wordpress.com/You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibH%2BgOb7nEsMnsktcU6Hy412R5dsu%2BtejXhYuyH-YPZ-uQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
On Fri, Jun 28, 2019 at 7:52 AM 'Mariano Martinez Peck' via VA Smalltalk <[hidden email]> wrote:
--
Well, from a mathematical standpoint, 1.0 and -1.0 are special. I do think the easiest way to get the answers is to add them to the mix. And perhaps "specials" is not the best name, so if you have a better name, feel free to use it.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAGNapEOSYR2mFmXSV7XjWOPBUQsLD8Syp1jmuKjEKey57Vu__g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. |
Thanks Richard. So I changed your script to add 1.0 and -1.0 and also there was a problem with: answer := [firstOperand perform: operation with: secondOperand] on: Error do: [:ex | ex return: ex messageText]. Because in the case of ZeroDivide that was answering nil instead of the real exception message. So I replaced #messageText with #description. I then completed the rest of the OS/Versions. Attached is the final doc with the differences. Our conclusion is that the new VM (VA >= 9.0) keep the exact same results as the old VM (VA <= 8.6.3), in both, Windows and Linux. Which does not surprise us as minimizing behavioral changes in new VM was one of our goals. Now, we also agree that there are some scenarios where Linux and Windows answer differently. But again, since it has been like this for years (even in the old VM), it looks like a bit risky to change now and the potential code we could break. We will still discuss this in our next development meeting and I will let you know the results. Thanks for the script for carrying on the tests! Best regards, On Fri, Jun 28, 2019 at 12:37 PM Richard Sargent <[hidden email]> wrote:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: https://marianopeck.wordpress.com/You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibH5N4_pOHmCmENOKE3ipJ7-DBGz9RJc9M5ahhvMeuuqtQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. Special Floats Testing - new.pdf (168K) Download Attachment |
Administrator
|
On Tue, Jul 2, 2019 at 7:31 AM 'Mariano Martinez Peck' via VA Smalltalk <[hidden email]> wrote:
It would be nice if there were a single selector which would answer the message text if not nil and the exception description otherwise. (Like others, I really don't want to see the "(ExError) An error occurred" prefix if there is anything else which could be displayed.)
Agreed. You guys did a great job on the VM rewrite.
At this point, I agree changing things is not a good idea. I really would like to have a clear understanding of what causes the different behaviour between Linux and Windows implementations and whether it could be controlled. I think it can, at least under Linux. Who knows about Windows?!! The following note is from one of our bug entries, raised by a customer. It does look like it is controllable, although most of what Martin documents is far more detailed than I care to become expert on!
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAGNapEMX3Rgm6DYmfESEy9oXyAeGtghu29Ys4tZ3E95wqvONKg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. |
On Tue, Jul 2, 2019 at 1:58 PM Richard Sargent <[hidden email]> wrote:
Agree. I think the reason is related to whether the Exception are the old VisualAge kind or the "new" ones, but I am not sure.
You wouldn't be surprise if our VM team agreed with you, would you? hahahahahah.
Thanks. I will pass this info to them and see if we can elaborate a response.
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: https://marianopeck.wordpress.com/You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibEu6gDSyvKvV-1vjHO-e0mJcaovDy%2BFNpBpNhM88-cpYQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. |
Mariano, there's not much I can add to the Divide by Zero problem, but I ask you to take a loot at this thread about Exception's descriptions: Interestingly, there still seem to be differences betwwen #messageText and #descriptiion. Plus: there is no "officially" correct way documented anywhere, afaik. Ceterum Censeo this "(ExError)..." prefix is unnecessary and must go away. But you know that already, I just wanted to make sure to nag once again ;-) Joachim You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/11214853-8b8e-4739-a50b-16c4dce019bd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
On Wed, Jul 3, 2019 at 3:08 AM Joachim Tuchel <[hidden email]> wrote:
Yes. And I can't say anything else from what Seth has already said: Just to follow up with what I said I would do, I have put in Case 64804 into our system into the backlog. I have made reference to our discussion here and a linked it to Case 50663 from 2013 which also addressed Signal>>description issues from https://groups.google.com/forum/#!msg/va-smalltalk/Fs6trFTfTs0/NQcD72RgbygJ. This will be reviewed at one of our major planning meetings after the 9.2 release.
Thanks. I will also add this observation and this thread too in that case. Best, Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: https://marianopeck.wordpress.com/You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibG1wMnqCdF%3DfeO8tFw4VrN0x6UEdJ1Sx_QWUU6c_6ROBw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
In reply to this post by Mariano Martinez Peck-2
On Tuesday, July 2, 2019 at 11:54:46 AM UTC-7 [hidden email] wrote:
I just came back to this thread and had to wonder if,over the last year or so, anyone came up with an explanation for the different Linux behaviour versus the Windows behaviour for -3.0/0.0?
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/0c52c41a-1a80-48b5-a5fd-a79e2a0e432bn%40googlegroups.com. |
Free forum by Nabble | Edit this page |