Hi Simon
i have found another bug on the cob_decimal_pow function :
When a exponent is an integer and does not fit to ulong or slong then we execute the compute with Taylor series function.
But in this case , the sign of the result is not properly computed as we have to check if the exponent is even or odd in order to get the correct result sign
For example :
1.0000000000000000000000000000000000001 ** -9223372036854776134
should give 0.9999999999999999990776627963145223870
instead the result is -0.9999999999999999990776627963145223870
Denis
sounds like you can come up with a minimal COBOL program for the testsuite and a fix for libcob - please give it a go
yes i'm working on it :-)
Hi Simon
Here is an example.
I have a hudge patch that include bug fixes #924, #925, #989 and a full testing suite for power compute.
I will send it as a pull request to the ocaml repository .
Denis
Am 25.09.2024 um 17:20 schrieb Denis HUGONNARD-ROCHE:
Thanks!
Please try to create separate PRs for each bug that is not totally
intermixed with another one.
Thank you,
Simon
Hum difficult to push separates PR as i have deeply modified the cob_decimal_pow function
Just see what you can separate; I'd likely keep everything that involves
functions like the mentioned in one patchfile/PR.
Hi Simon
I have sent the PR, first time i use Github ... hope it's ok :-)
PR #182
Denis
When will these 3 bug fixes be loaded to the nightly build for 3.3 ?
As soon as I took the time to review and check-in upstream... as I commonly don't work 40h+ per week on GnuCOBOL this likely takes some time, in the meanwhile you could use the nightly tarball and apply the patches yourself (if you only use the nightly binaries that need to wait until this is "upstream available".
Note that there's already a bunch of stuff in the review queue of things sent by mail, via OCamlPro's GH mirror and even older changes from myself and there are pending issues I'm working on as well (apart from work ;-)
Hi Simon
I noticed the comment on github and i will modify the code as you adviced.
But i have a question before .
While reading IBM Cobol 6.4, i saw that regarding exponentiation (cf attached file)
Is it a standard Cobol rule, an IBM rule ?
Do we have to stick to IBM rule for better compatibility ?
What MF says about this cases ?
Denis