Re: Implementation of log(x) for SPARC32

2001-12-26 Thread Shachar Shemesh
f and went right for the flames. So refreshing to hear the IGLU people be so creative. P.S. Nadav - I have some GDB sessions on VHS, if you like. Nadav Har'El wrote: >On Tue, Dec 25, 2001, Shlomi Fish wrote about "Re: Implementation of log(x) for >SPARC32": > >>Ac

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Oleg Goldshmidt
Shlomi Fish <[EMAIL PROTECTED]> writes: > On 25 Dec 2001, Oleg Goldshmidt wrote: > > > Shlomi Fish <[EMAIL PROTECTED]> writes: > > > > > But who is John Galt? Speed is not of the outmost importance in > > > this case, so I think my implementation is fine. > > > > Only you can judge that. It's no

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Nadav Har'El
On Tue, Dec 25, 2001, Shlomi Fish wrote about "Re: Implementation of log(x) for SPARC32": > Actually, I checked it against the numbers in the range 0 .. 1, which is > my working range, and I discovered it returns very inaccurate results. > With some input from Ehud Karni,

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Shlomi Fish
On 25 Dec 2001, Oleg Goldshmidt wrote: > Shlomi Fish <[EMAIL PROTECTED]> writes: > > > But who is John Galt? Speed is not of the outmost importance in this case, > > so I think my implementation is fine. > > Only you can judge that. It's not only speed - are you sure that > whatever approximation

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Oleg Goldshmidt
Shlomi Fish <[EMAIL PROTECTED]> writes: > But who is John Galt? Speed is not of the outmost importance in this case, > so I think my implementation is fine. Only you can judge that. It's not only speed - are you sure that whatever approximation you used (I have not looked at your perl code) wil

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Shlomi Fish
On 25 Dec 2001, Oleg Goldshmidt wrote: > "Nadav Har'El" <[EMAIL PROTECTED]> writes: > > > I bet that the Sparc code is obfuscated for a reason (typically, > > such codes contain "magical" tables, for example) not just because > > the programmer was an idiot. > > Mathematical algorithms are usuall

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Oleg Goldshmidt
"Nadav Har'El" <[EMAIL PROTECTED]> writes: > I bet that the Sparc code is obfuscated for a reason (typically, > such codes contain "magical" tables, for example) not just because > the programmer was an idiot. Mathematical algorithms are usually very heavily optimized by hand, loops unrolled, sc

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Oleg Goldshmidt
"Nadav Har'El" <[EMAIL PROTECTED]> writes: > If you want to understand the "tricks" usually used to calculated "special > functions", like log (or sin or bessel functions, or whatever), you might > want to take a look at books like "Numerical Recipes in C" (includes an > interesting introduction

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Ehud Karni
On Tue, 25 Dec 2001 13:23:20 +0200 (IST), Shlomi Fish <[EMAIL PROTECTED]> wrote: > > FYI, I eventually gave up and coded a logarithm function in perl: > > # > #!/usr/bin/perl > > use strict; > > my $e_const = exp(1); > my $e_const_reci = (1/$e_const); > > my $number = shift |

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Nadav Har'El
On Tue, Dec 25, 2001, Shlomi Fish wrote about "Re: Implementation of log(x) for SPARC32": > I think they do. Congrats for Intel. Even though from what I understood of > the glibc code the log() is a base 2 logarithm for some reason. (even > though the tailor series is for lo

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Yedidyah Bar-David
Hi On Tue, Dec 25, 2001 at 01:41:23PM +0200, Nadav Har'El wrote: > On Tue, Dec 25, 2001, Shlomi Fish wrote about "Re: Implementation of log(x) for >SPARC32": > > Actually, usually glibc calls the processor's FPU logarithm routine. > > Oops, I didn&

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Shlomi Fish
On Tue, 25 Dec 2001, Tzafrir Cohen wrote: > On Tue, 25 Dec 2001, Shlomi Fish wrote: > > > Actually, usually glibc calls the processor's FPU logarithm routine. > > What about an i386 without an FPU? (an ancient 386 with no 80387, for > instance) > In that case, I thinks it emulates the FPU unit.

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Tzafrir Cohen
On Tue, 25 Dec 2001, Shlomi Fish wrote: > Actually, usually glibc calls the processor's FPU logarithm routine. What about an i386 without an FPU? (an ancient 386 with no 80387, for instance) -- Tzafrir Cohen mailto:[EMAIL PROTECTED] http://www.technion.ac.il/~tzafrir

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Shlomi Fish
On Tue, 25 Dec 2001, Nadav Har'El wrote: > On Tue, Dec 25, 2001, Shlomi Fish wrote about "Re: Implementation of log(x) for >SPARC32": > > Actually, usually glibc calls the processor's FPU logarithm routine. > > Oops, I didn't know the 386DX's FP

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Nadav Har'El
On Tue, Dec 25, 2001, Shlomi Fish wrote about "Re: Implementation of log(x) for SPARC32": > Actually, usually glibc calls the processor's FPU logarithm routine. Oops, I didn't know the 386DX's FPU had a logarithm function on it... Nice :) Do they also have things

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Shlomi Fish
On Tue, 25 Dec 2001, Nadav Har'El wrote: > On Tue, Dec 25, 2001, Shlomi Fish wrote about "Implementation of log(x) for SPARC32": > > I need an implementation of the C function double log(double x) for SPARC > > (32-bit - not UltraSPARC) written using Assembler or

Re: Implementation of log(x) for SPARC32

2001-12-25 Thread Nadav Har'El
On Tue, Dec 25, 2001, Shlomi Fish wrote about "Implementation of log(x) for SPARC32": > I need an implementation of the C function double log(double x) for SPARC > (32-bit - not UltraSPARC) written using Assembler or C or a combination of > both. > > I tried to rip code

Implementation of log(x) for SPARC32

2001-12-24 Thread Shlomi Fish
Hi! I need an implementation of the C function double log(double x) for SPARC (32-bit - not UltraSPARC) written using Assembler or C or a combination of both. I tried to rip code out of the glibc (which I was succesfully able to do with the i386 architecture), but I could not make sense of what