1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Log Function

Discussion in 'C#' started by mail1, Mar 23, 2008.

  1. #1
    I am using the log function to calculate a field on my form and I am getting the following error when I am trying to find the log of a number less than 1 ( a negative number):

    Error Type:
    Microsoft VBScript runtime (0x800A0005)
    Invalid procedure call or argument: 'log'

    How can this be resolved.
     
    mail1, Mar 23, 2008 IP
  2. mythbuster08

    mythbuster08 Peon

    Messages:
    180
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you do "log(ANegativeNumber)" you can not solve, bc log is not defined for numbers <= 0

    log(0,10) = y means 10^y=0 -> err
    log(-1,10)=y means 10^y=-1 -> err
    log(1,10)=y means 10^y=0 -> y=0 !
     
    mythbuster08, Mar 26, 2008 IP