Dead Hackers Society
Other BBSes »
 
 

68k Inside

Sommarhack 2024

Silly Venture 2024 SE
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: DSP frac arithmetic help
Posted by: dml Feb,27.2015-18:42 

Ok, not sure I understood the original problem :)

> In fact, I need to do :
> get 2 fractional values (each betwen -1 and 0.9999998), then

This should be ok.

$800000 = -1.0
$7fffff = 0.99999

All values in between can be multiplied. (but 1.0 is outside of the range)

> ABS val1
> ABS val2

This should be ok, if your values have been assigned to a, b (a1, b1 and fully sign extended into a2).

However if you moved your values into a1, b1 directly then you're screwed and abs will not behave as expected.

> val1*val1 + val2*val2

If you are squaring values, you shouldn't need abs? The result of sqr(x) is always positive anyway.

In any case, best find out whats going on with abs before you remove it. I suspect is a sign extend problem.

Hope that was a bit more helpful this time :)















[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
DSP frac arithmetic help Laurent / Thadoss Feb,27.2015-15:03
  Re: DSP frac arithmetic help Laurent / Thadoss Feb,27.2015-15:08
  Re: DSP frac arithmetic help dml Feb,27.2015-15:28
    Re: DSP frac arithmetic help Laurent / Thadoss Feb,27.2015-18:32
      Re: DSP frac arithmetic help dml Feb,27.2015-18:42
        Re: DSP frac arithmetic help dml Feb,27.2015-18:46
          Re: DSP frac arithmetic help Splash/S1 Feb,27.2015-20:21
            Re: DSP frac arithmetic help dml Feb,27.2015-20:38
              Re: DSP frac arithmetic help Laurent / Thadoss Feb,27.2015-20:42
    Re: DSP frac arithmetic help mikro Feb,28.2015-10:44
      Re: DSP frac arithmetic help dml Feb,28.2015-12:35


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson