Keflavich wrote:
> [snip]
>
> I feel fairly certain, however, that floats are exactly what I want
> for my purposes: I need moderately high precision and I'm not
> concerned about the least-significant-bit errors except when they
> violate function domains. I guess the overriding lesson is that e
On Dec 14, 8:28 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Dec 13, 6:20 pm, Keflavich <[EMAIL PROTECTED]> wrote:
>
> > Solved: used round(number,12) in this case for all of the operands of
> > my arcsines. Not pretty, but at least VIM made it easy...
>
> > Thanks for the help,
> > Adam
>
> I s
On Dec 13, 6:20 pm, Keflavich <[EMAIL PROTECTED]> wrote:
> Solved: used round(number,12) in this case for all of the operands of
> my arcsines. Not pretty, but at least VIM made it easy...
>
> Thanks for the help,
> Adam
I suspect this could even fail in some circumstances. If it's for
school yo
On Dec 14, 2:57 am, "Nikos Vergas" <[EMAIL PROTECTED]> wrote:
> > Solved: used round(number,12) in this case for all of the operands of
> > my arcsines. Not pretty, but at least VIM made it easy...
>
> You might have the same problem though:
>
> >>> round(1.0003401032523500235,13)
> 1.0003
En Fri, 14 Dec 2007 00:22:18 -0300, Keflavich <[EMAIL PROTECTED]>
escribió:
> On Dec 13, 5:52 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Thu, 13 Dec 2007 14:30:18 -0800, Keflavich wrote:
>> > Hey, I have a bit of code that died on a domain error when doing an
>> >
> Solved: used round(number,12) in this case for all of the operands of
> my arcsines. Not pretty, but at least VIM made it easy...
You might have the same problem though:
>>> round(1.0003401032523500235,13)
1.000340103
>>> round(1.0003401032523500235,12)
1.00034011
-
On Dec 14, 3:22 am, Keflavich <[EMAIL PROTECTED]> wrote:
> On Dec 13, 5:52 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> cybersource.com.au> wrote:
> > On Thu, 13 Dec 2007 14:30:18 -0800, Keflavich wrote:
> > > Hey, I have a bit of code that died on a domain error when doing an
> > > arcsin, and appar
On Dec 13, 5:52 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Thu, 13 Dec 2007 14:30:18 -0800, Keflavich wrote:
> > Hey, I have a bit of code that died on a domain error when doing an
> > arcsin, and apparently it's because floating point subtraction is having
> > problems.
On Thu, 13 Dec 2007 14:30:18 -0800, Keflavich wrote:
> Hey, I have a bit of code that died on a domain error when doing an
> arcsin, and apparently it's because floating point subtraction is having
> problems.
I'm not convinced that your diagnosis is correct. Unless you're using
some weird, unco
Solved: used round(number,12) in this case for all of the operands of
my arcsines. Not pretty, but at least VIM made it easy...
Thanks for the help,
Adam
On Dec 13, 4:01 pm, Keflavich <[EMAIL PROTECTED]> wrote:
> The decimal package isn't what I'm looking for - I don't want to have
> to retype
The decimal package isn't what I'm looking for - I don't want to have
to retype every variable in my code, and I have arcsines showing up on
about a dozen lines right now. It also seems like a rather
complicated way to deal with the problem; maybe I just need to
implement my own rounding code, but
Thanks, I'll have a look at that. I'm not sure the decimal type is
included in numpy, though, which is what I'm using. It doesn't show
up in their documentation, at least.
Adam
On Dec 13, 3:39 pm, [EMAIL PROTECTED] (Aahz) wrote:
> In article <[EMAIL PROTECTED]>,
>
> Keflavich <[EMAIL PROTECTED
In article <[EMAIL PROTECTED]>,
Keflavich <[EMAIL PROTECTED]> wrote:
>
>Hey, I have a bit of code that died on a domain error when doing an
>arcsin, and apparently it's because floating point subtraction is
>having problems. I know about the impossibility of storing floating
>point numbers precis
Hey, I have a bit of code that died on a domain error when doing an
arcsin, and apparently it's because floating point subtraction is
having problems. I know about the impossibility of storing floating
point numbers precisely, but I was under the impression that the
standard used for that last dig
14 matches
Mail list logo