CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19

Thread: mathematical equation implmentation in c++

  1. #16
    Join Date
    Feb 2017
    Posts
    536

    Re: mathematical equation implmentation in c++

    Quote Originally Posted by pdk5 View Post
    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. #17
    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. #18
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,118

    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++17 Compiler: Microsoft VS2019 (16.6.1)

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

Page 2 of 2 FirstFirst 12

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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)