Pff, not the good code, the commented one, reverting it made me do another mistake, but the idea is there.
Le mer. 29 mai 2024 à 01:45, Grégory Vanuxem <[email protected]> a écrit : > > Le mar. 28 mai 2024 à 22:34, Waldek Hebisch <[email protected]> a écrit : > > > > On Tue, May 28, 2024 at 07:10:35PM +0200, Grégory Vanuxem wrote: > > > Hello, > > > > > > (12) -> unitNormal complex(7,0)$JWSGINT > > > > > > >> Error detected within library code: > > > Bug: ridiculous record representation > > > > > > (12) -> > > > > > > Not very "professional"... > > > > Well, the message clearly says what was detected: in place which > > expected a Recored appreared something with unexpected representation. > > That was not a problem, that made me smile. I was just surprised by > the "ridiculous " word. Usually error messages are neutral and > informative, this one is like: Ridiculous! Do it again! > > > > In fact, Void return value instead of a Record, I forgot a branch. > > > Secondly, it was not handled at compile time. > > > > > > withoust seeing code that triggers this it it hard to say who > > is guilty and what exactly happended. > > It was a typo in a Gaussian integer domain using another Integer > domain than the FriCAS one, a domain without parameters like > GaussianInteger() == Complex(Integer) for example. > > The commented code is the good one, a missing equal sign: > > unitNormal x == > zero? x => [1, x, 1] > one? x => [1, 1, 1] > re := real(x); im := imag(x) > re > 0 => > --im >= 0 => [1, x, 1] > im > 0 => [1, x, 1] > im < 0 => [-imaginary(), complex(-im, re), imaginary()] > im <= 0 => [-1, -x, -1] > [imaginary(), complex(im, -re), -imaginary()] > > It was quickly coded, and can be better probably, to avoid tons of > coercion issues to Expression(MyGaussianInteger) with trigonometric > functions. Elements of this domain are not intended to be coerced to > Expression(*) but that is how panAxiom is implemented. > > I am coding toy domains using the Wolfram™ Symbolic Transport Protocol > for development purposes. And am adding a Gaussian Integer domain with > the Wolfram™ Kernel behind it. I will also probably do some tests with > "high" precision floating point numbers to compare results from > different floating point implementations (symbolic things are in the > pipeline also of course) . The WolframKernel is free for this purpose, > I no longer own Wolfram Mathematica ™, I was a student at that time > (not in mathematics) > > - Greg > > > > -- > > Waldek Hebisch > > > > -- > > You received this message because you are subscribed to the Google Groups > > "FriCAS - computer algebra system" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/fricas-devel/ZlY_yzgNQ8smIQMs%40fricas.org. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/CAHnU2dZWZVdCDPT3KjQpN-wU%2BKtLAGMxkLGnvORQMooiOuPPQQ%40mail.gmail.com.
