OOps... the tabs were garbled
thus again the numbers
...
...

Let's have a look at some numbers!
What follows is the output of a small test program,
computing some common decibel factors. For one, we compute...
10^-exponent  vs powf(10, -exponent)
1/10^exponent vs powf(0.1, exponent)
And additionally exp10f(-exponent)

And this with -O0, -03  and then computing with doubles -O0 and -O3

CompileFlags:
-std=gnu++11 -march=athlon64 -m64 -msse -msse2 -mfpmath=sse -ffast-math -fno-finite-math-only -fomit-frame-pointer -g3 -ggdb


Observations:
  * the optimised exp()-from-precomputed-log always
    yields same values for 10^-exponent vs 1/10^exponent
  * the powf() differs with -O3
  * using doubles in our optimised variant yields same values as exp10f


OOps... the tabs were garbled
thus again the numbers
...
...

Let's have a look at some numbers!
What follows is the output of a small test program,
computing some common decibel factors. For one, we compute...
10^-exponent  vs powf(10, -exponent)
1/10^exponent vs powf(0.1, exponent)
And additionally exp10f(-exponent)

And this with -O0, -03  and then computing with doubles -O0 and -O3

CompileFlags:> -std=gnu++11 -march=athlon64 -m64 -msse -msse2 -mfpmath=sse -ffast-math
 > -fno-finite-math-only -fomit-frame-pointer -g3 -ggdb

Observations:
  * the optimised exp()-from-precomputed-log always
    yields same values for 10^-exponent vs 1/10^exponent
  * the powf() differs with -O3
  * using doubles in our optimised variant yields same values as exp10f


## float with -O0 ##

======    -20dB
1/10^v    =    0.099999994     |powf:     0.100000001
10^-v     =    0.099999994     |powf:     0.100000001
                                |exp10f    0.100000001

======    -40dB
1/10^v    =  0.00999999978     |powf:    0.0100000007
10^-v     =  0.00999999978     |powf:   0.00999999978
                                |exp10f  0.00999999978

======    -60dB
1/10^v    = 0.000999999931     |powf:   0.00100000005
10^-v     = 0.000999999931     |powf:   0.00100000005
                                |exp10f  0.00100000005

======    -100dB
1/10^v    = 9.99999338e-06     |powf:  1.00000007e-05
10^-v     = 9.99999338e-06     |powf:  9.99999975e-06
                                |exp10f 9.99999975e-06



## float with -O3 ##

======    -20dB
1/10^v    =    0.099999994     |powf:     0.099999994
10^-v     =    0.099999994     |powf:     0.099999994
                                |exp10f    0.100000001

======    -40dB
1/10^v    =  0.00999999978     |powf:   0.00999999978
10^-v     =  0.00999999978     |powf:   0.00999999978
                                |exp10f  0.00999999978

======    -60dB
1/10^v    = 0.000999999931     |powf:  0.000999999931
10^-v     = 0.000999999931     |powf:  0.000999999931
                                |exp10f  0.00100000005

======    -100dB
1/10^v    = 9.99999338e-06     |powf:  9.99999338e-06
10^-v     = 9.99999338e-06     |powf:  9.99999338e-06
                                |exp10f 9.99999975e-06



## double with -O0 ##

======    -20dB
1/10^v    =    0.100000001     |powf:     0.100000001
10^-v     =    0.100000001     |powf:     0.100000001
                                |exp10f    0.100000001

======    -40dB
1/10^v    =  0.00999999978     |powf:    0.0100000007
10^-v     =  0.00999999978     |powf:   0.00999999978
                                |exp10f  0.00999999978

======    -60dB
1/10^v    =  0.00100000005     |powf:   0.00100000005
10^-v     =  0.00100000005     |powf:   0.00100000005
                                |exp10f  0.00100000005

======    -100dB
1/10^v    = 9.99999975e-06     |powf:  1.00000007e-05
10^-v     = 9.99999975e-06     |powf:  9.99999975e-06
                                |exp10f 9.99999975e-06



## double with -O3 ##

======    -20dB
1/10^v    =    0.100000001     |powf:     0.099999994
10^-v     =    0.100000001     |powf:     0.099999994
                                |exp10f    0.100000001

======    -40dB
1/10^v    =  0.00999999978     |powf:   0.00999999978
10^-v     =  0.00999999978     |powf:   0.00999999978
                                |exp10f  0.00999999978

======    -60dB
1/10^v    =  0.00100000005     |powf:  0.000999999931
10^-v     =  0.00100000005     |powf:  0.000999999931
                                |exp10f  0.00100000005

======    -100dB
1/10^v    = 9.99999975e-06     |powf:  9.99999338e-06
10^-v     = 9.99999975e-06     |powf:  9.99999338e-06
                                |exp10f 9.99999975e-06





_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel

Reply via email to