Forum Discussion

FICO's avatar
FICO
Community Manager
2 years ago

How to get LOG to the base 10 in FICO

I have the following formula to get a score in FICO -

SCORE = math().max(0, math().min(-100-math().log(aFinalVar)*400, 1000))

The bold part has the LOG function which is log to the base of e, I need to have the same function for log to the base of 10.

I do not see log to the base of 10 under the math library, can someone let me know if that is an option available or how do I convert to Log10 instead of loge?

5 Replies

  • FICO's avatar
    FICO
    Community Manager

    Thanks! Much Appreciated

  • FICO's avatar
    FICO
    Community Manager

    I tried both methods but I am getting the following error -

    imageI am getting the following Error:

    image

  • FICO's avatar
    FICO
    Community Manager

    for the other method -

    image

    I get the following error when I compile

    imageSeems like both are giving error

  • FICO's avatar
    FICO
    Community Manager

    To compute a log base 10, you can use the logarithm change of base rule that says:

    log (base b) a = (log (base d) a) / (log (base d) b)

    so in your example you would use

    math().max(0, math().min(-100-(math().log(aFinalVar)/math().log(10))*400, 1000))