Change the base of Log() using second parameter

Propose new features and changes
User avatar
HakitoJin
Posts: 6
Joined: 02 Oct 2016, 17:20

Change the base of Log() using second parameter

04 Jun 2018, 12:55

Here is what I am currently using:

Code: [Select all] [Download] GeSHi © Codebox Plus

LogBase(Number,Base=10)
{
return Log(Number)/Log(Base)
}

It would be neat if the built-in version could do the same.
User avatar
jeeswg
Posts: 4795
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Change the base of Log() using second parameter

04 Jul 2018, 18:00

- Great idea, this is what I'm currently using:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

- Do you have much use for this? Which bases? I would use it mainly for base 2 in relation to audio e.g. here:
jeeswg's SoX (Sound eXchange) tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=29234
- I also thought that Floor/Ceil could handle a 2nd parameter, like Round does.
Floor/Ceil able to handle decimal places (cf. Excel's Trunc function) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=41539

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 3 guests