Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Looking for a math genius

  1. #1
    All AUGI, all the time robert.manna's Avatar
    Join Date
    2005-05
    Location
    Boston
    Posts
    777

    Default Looking for a math genius

    Hey folks.

    I'm attempting to use Revit's Log function in a formula, and I'm not getting results that agree with Excel. We've tried two ways, and I admit to not being a math genius, and never really liking Logs in the first place. We've tried the two versions below:

    = (16.649*(log(<parameter name>)/(log(exp(1))))-15.222)

    and

    = (16.649 * log(<parameter name>) - 15.222)

    In both cases when using a parameter value of 30 Revit returns a value around 10.4 or something, in Excel we get a value of about 41.4 which we know to be accurate. I think I'm misunderstanding something about how Revit processes logs? Can anyone help?

    Thanks much,
    -Robert

  2. #2
    I could stop if I wanted to sthedens's Avatar
    Join Date
    2006-01
    Posts
    306

    Default Re: Looking for a math genius

    Is it something to do with the assumed base value of the LOG function? I.e. is one of them assuming the LOG function uses base 10, while the other is a Natural LOG using a base 2.71828182845904. Usually, Natural LOGs have a separate function called "LN", that is the same as LOG base 2.71828182845904. However, I don't see LN as a valid function in Revit formulas.

  3. #3
    Certified AUGI Addict patricks's Avatar
    Join Date
    2004-06
    Location
    Memphis TN area
    Posts
    6,719

    Default Re: Looking for a math genius

    The natural logarithm (logarithm base e, the mathematical constant of ~2.71828 ) is what gives the 41.4 result. I guess that is what Excel is using, although I would think Excel would recognize the difference between a "log" command (log base 10) and a "ln" command (natural log).

    You can convert to a different log base. Do this with the following: (log (parameter)) / (log (needed base)).

    So log base 10 of a number can be achieved by dividing the natural log of your parameter by the natural log of 10. Or vice versa, dividing log base 10 of your parameter by log base 10 of "e" (2.7182 will approximately give you the natural log of the number.

    Now I wouldn't call myself a genius, although I took some Calculus classes, but I did have to look up all of this. http://en.wikipedia.org/wiki/Logarithm#Change_of_base

    Now I should note that I could not get a result of 10.4 using either log base 10 or the natural logarithmic function. So what Revit is calculating, I'm not really sure.
    Intern Architect, BIM Manager/Coordinator
    AERC, PLLC
    Hernando, Mississippi

    Revit - all up in your voxel space

  4. #4
    All AUGI, all the time robert.manna's Avatar
    Join Date
    2005-05
    Location
    Boston
    Posts
    777

    Default Re: Looking for a math genius

    Well you obviously remember your calculus better then I do. The really strange thing is, in Revit if use the formula suggusted (which I had already) I get the same 10.4 result if I have log(exp(1)) or log(10) as the piece after the divide symbol.

    Very strange....

  5. #5
    Certified AUGI Addict patricks's Avatar
    Join Date
    2004-06
    Location
    Memphis TN area
    Posts
    6,719

    Default Re: Looking for a math genius

    Doing a little algebra it appears that a log base 9.1163... would be required to get the result of around 10.4.... that you described. That is the weirdest thing I've ever heard of.

    I'm going by the 2nd formula in your original post.
    Intern Architect, BIM Manager/Coordinator
    AERC, PLLC
    Hernando, Mississippi

    Revit - all up in your voxel space

  6. #6
    All AUGI, all the time robert.manna's Avatar
    Join Date
    2005-05
    Location
    Boston
    Posts
    777

    Default Re: Looking for a math genius

    Quote Originally Posted by patricks View Post
    Doing a little algebra it appears that a log base 9.1163... would be required to get the result of around 10.4.... that you described. That is the weirdest thing I've ever heard of.

    I'm going by the 2nd formula in your original post.
    This is why I feel like I'm doing something wrong.

    If you plug either of my original formulas into the family editor, what do you get for a result if you put in "35" for the parameter value?

  7. #7
    Certified AUGI Addict patricks's Avatar
    Join Date
    2004-06
    Location
    Memphis TN area
    Posts
    6,719

    Default Re: Looking for a math genius

    Quote Originally Posted by robert.manna View Post
    This is why I feel like I'm doing something wrong.

    If you plug either of my original formulas into the family editor, what do you get for a result if you put in "35" for the parameter value?
    35 gives me 10.4. I was using 30 from your original post which was giving me 9.371.

    So the logarithmic function in Revit is log base 10.

    What you used in Excel is the natural logarithm. To get that in Revit I think you'll have to divide (log (parameter) / log (2.71828 ).
    Intern Architect, BIM Manager/Coordinator
    AERC, PLLC
    Hernando, Mississippi

    Revit - all up in your voxel space

  8. #8
    All AUGI, all the time robert.manna's Avatar
    Join Date
    2005-05
    Location
    Boston
    Posts
    777

    Default Re: Looking for a math genius

    But the, instead of "2.718", should I not be able to use "exp(1)" which according to the Revit syntax guide , should be e raised to the first power, which should be e, without having to worry about decimal accuracy in e? But, possibly raising e to the first just doesn't work, and I'll stick with your suggustion.

    -R

  9. #9
    Certified AUGI Addict patricks's Avatar
    Join Date
    2004-06
    Location
    Memphis TN area
    Posts
    6,719

    Default Re: Looking for a math genius

    umm... wow. Revit does "e" COMPLETELY wrong. e^1 should be 2.71828.... but instead it's 10 in Revit.

    Looks to me like Revit is treating e like the inverse of the common logarithmic base 10 function.
    Intern Architect, BIM Manager/Coordinator
    AERC, PLLC
    Hernando, Mississippi

    Revit - all up in your voxel space

  10. #10
    Revit Forum Manager Steve_Stafford's Avatar
    Join Date
    2003-04
    Location
    Irvine, CA
    Posts
    6,809

    Default Re: Looking for a math genius

    Most definitely not a math genius...grocery store math is more my speed... I'm curious though, any chance Project and Parameter Units are affecting this somehow?

Page 1 of 3 123 LastLast

Similar Threads

  1. Genius Mech is back!
    By jaberwok in forum Software
    Replies: 3
    Last Post: 2006-12-14, 11:40 AM
  2. the genius of skisouth
    By Max Lloyd in forum Revit - Gallery
    Replies: 19
    Last Post: 2005-03-17, 09:19 PM

Posting Permissions

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