-
May 3rd, 2020, 01:45 AM
#16
Re: mathematical equation implmentation in c++
Originally Posted by pdk5
Thanks , but whatabout the first one ?
Well, if you have a time measure in nanoseconds and take the dB measure of that relative to 1 nanosecond you get exactly the same dB measure as if you instead have the measure in seconds relative to 1 second. In both cases you would use the same decibel formula,
ratio = 10 ^ (x/10)
to recover the ratio from the dB value. You just have to remember that the ratio in the nanosecond case has to be multiplied by 10^-9 to get the time in seconds.
The first of your formulas can be rewritten as
ratio = 10 ^ (8*x/10)
This is the ordinary dB formula but with a strange constant 8. I have no idea where it comes from. I first suspected it may have something to do with the 1 nanosecond reference but I have not been able to find out how. Maybe it's some application constant, perhaps a cubic volume with sides 2, I don't know. I suggest you ask your costumer for a clarification.
Last edited by wolle; May 3rd, 2020 at 01:56 AM.
-
May 3rd, 2020, 02:52 AM
#17
Re: mathematical equation implmentation in c++
Thanks a lot wolle for getting back and explaining in detail. Very helpful .
-
May 3rd, 2020, 05:48 AM
#18
Re: mathematical equation implmentation in c++
[Subject to wolle's posts, I've mugged up on the use of dB and found that it can indeed be used to express a change in value as well as ratios of power. When I studied Physics, we only used dB as a power ratio (mainly audio), hence my earlier posts. Sorry for my previous misleading posts. You learn something new every day! ]
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
May 3rd, 2020, 06:43 AM
#19
Re: mathematical equation implmentation in c++
Thanks a lot kaud for the response . and discussions/views here are really helpul to learn in better way
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|