Add more Native Math functions.

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Add more Native Math functions.

Post by skywalk »

Hi,
I know this topic has been brought up before, but can we add some more native basic functions?

http://www.purebasic.fr/english/viewtop ... s&start=15

Couldn't find the antilogarithm -> Exp(). The complement of the Log() function.

Work around:
I know with the Pow(x.d, exponent.d) function you get x ^ exponent.
So, without Exp(), I am forced to create a constant for e ~= 2.7182818284590452353, and use it in the Pow() function.
Pow(#E, 2) = 7.3890560989306762

Can we add a constant for #E to the list of built-in constants?
#E = 2.7182818284590452353
#PI already exists. :)

Thanks for a great development tool!
Last edited by skywalk on Mon Jul 07, 2014 11:30 pm, edited 1 time in total.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Add more Native Math functions.

Post by freak »

done for the next version.
quidquid Latine dictum sit altum videtur
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Add more Native Math functions.

Post by skywalk »

Cool,
This really is an awesome development tool! :)
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Add more Native Math functions.

Post by Michael Vogel »

freak wrote:done for the next version.
Cool.
Next step, even more complicate (integer) things, like signum, min, max, scale,... ? :wink:

Michael
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Add more Native Math functions.

Post by blueznl »

Mine is very little... I mean, my request :-)

^ <-- is all... 2^2 etc. just like in most other Basic dialects... It looks so much nicer than Pow(2,2)... IMHO YMMV etc. etc. etc.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply