Hello.
I´m trying to do a simply program to sum dB.
I have created a function that read two dB and operate with them
The problem is that the LOG give me problems. It always return 1 tu dBtotal.
And the most simple LOG operation ( Log(c, 10) ) give the error "Too many arguments for this function!"
I´m new in Hollywood and the last time I coded something was a lot of years ago!
Hope for a tip!
Thanks!
Function p_Suma(dx1, dx2)
a = (10^(dx1/10))
b = (10^(dx2/10))
c = a + b
dBtotal = Log(c) /* HERE */
NPrint ("La suma es:",dBtotal)
EndFunction
logarithm problem
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: logarithm problem
This is a known bug in Hollywood. It will be fixed in the next version
Re: logarithm problem
Hope do you fix soon! I really thought was becoming mad!
Thanks!
Thanks!
Re: logarithm problem
Ld() function at least seems to work in Hollywood and writing your own Log10() function based on that is quite easy...tolkien wrote: Hope do you fix soon! I really thought was becoming mad!
If I recall correctly, a little bit of math gives us: log10(x) = log2(x) / log2(10)
So our function becomes:
Code: Select all
Function p_log10(n)
Local result = Ld(n)/Ld(10)
Return(result)
EndFunction
Re: logarithm problem
Hey! Thanks jalih! I´ll try it later. But a fix would be better!
Re: logarithm problem
Siii! Tried and working! Thanks so much!