CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

# Thread: mathematical equation implmentation in c++

1. Member +
Join Date
Feb 2017
Posts
536

## 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.

2. Member
Join Date
May 2015
Posts
245

## Re: mathematical equation implmentation in c++

Thanks a lot wolle for getting back and explaining in detail. Very helpful .

3. ## 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! ]

4. Member
Join Date
May 2015
Posts
245

## 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

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•