Maths Precision Workaround
Kenneth Brody
kenbrody at spamcop.net
Tue Jun 24 08:24:16 PDT 2014
On 6/18/2014 10:57 PM, Ken Cole wrote:
> I see via the online help files that maths precision is "16 Places to
> left. 8 places to right of decimal Pt."!!
>
> Okay for most things I guess but totally underwhelming for my current
> project where I need up to 16 places to the right of the decimal point
> to actually get anything apart from 0.0.
>
> So, Sco Unix, filePro 5.0.7, what do the Unix experts suggest I do to
> get that level of precision?
>
> I have thought about but not tested:
>
> 1. write file with required calculation, system out to run bc
> redirecting stdin and stdout, read in results file.
> 2. Write a user program in sh or Perl to take the inputs and generate
> the outputs to be read back in via user.
>
> I mostly need sin, cos, atan, exp and sqrt functions.
I was going to suggest simply multiplying everything by 100000000, but that
won't help with these functions.
Assuming that bc and/or Perl would do the job, you could use USER to have
the other program do the calculations. (You can use USER for bc just as
well as you can Perl.) Just make sure you take into account any banners
that the program may show at startup.
--
Kenneth Brody
More information about the Filepro-list
mailing list