Page 1 of 1

[Implemented] Wanted for PB3.00 - More Math Commands ;)

Posted: Thu Feb 07, 2002 5:40 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.

Hi Fred!
Would be nice to see some more standard math commands in the next version of PureBasic like...


MOD some guys this need this :wink:
^ to calculate stuff like 4^2=16 :wink:



PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten

Posted: Thu Feb 07, 2002 7:49 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.

Don't like using the Pow(a,b) that is build into PB??
Or the IMod(a,b) command in the MathExtras library?

We seem to already have access to these commands.



Edited by - paul on 07 February 2002 19:50:30

Posted: Thu Feb 07, 2002 7:56 pm
by BackupUser
Restored from previous forum. Originally posted by PB.

> Don't like using the Pow(a,b) that is build into PB??

But it's not documented... what does Pow do?


PB - Registered PureBasic Coder

Posted: Thu Feb 07, 2002 7:59 pm
by BackupUser
Restored from previous forum. Originally posted by Manolo.


^ to calculate stuff like 4^2=16 :wink:

Yes, hehe

Code: Select all

OpenConsole()
PrintN(Str(2*(2*4)))
a$=Input()
I prefer like solution 4^2=16

Posted: Thu Feb 07, 2002 8:11 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.

result=Pow(4,2)

result=16
This command is under Math commands in the 2.90 documentation

It's that same as result=4^2



Edited by - paul on 07 February 2002 20:12:50

Posted: Thu Feb 07, 2002 8:28 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.
Paul wrote:
result=Pow(4,2) - result=16
This command is under Math commands in the 2.90 documentation
Ohhh thanks! I havent known ^ as Pow(), because ^ is a standard math sign :wink:)

PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten

Posted: Thu Feb 07, 2002 9:03 pm
by BackupUser
Restored from previous forum. Originally posted by DarkUni.

I talked to Fred about at least getting MOD in as part of the core language. I mean this is REALLY low level stuff that I think should be core of any language.

I'm surprised so much math stuff has be located outside the core language - but then, I guess there isn't as much higher level math stuff in app programming as in game programming.

Shane R. Monroe
Dark Unicorn Productions

Posted: Fri Feb 08, 2002 7:32 am
by BackupUser
Restored from previous forum. Originally posted by TronDoc.
would be nice to see some more standard math commands in the next version of PureBasic like...MOD some guys this need this :wink:^ to calculate stuff like 4^2=16 :wink:MrVainSCL! aka Thorsten
I can't help but agree. Basic math (standard) functions should not have to be
called dependent upon non-standard methods whether they be user-created libraries, built in C-type function calls or whatever.
I have much praise for the folks writing user-created libraries.
I just don't understand why they don't get together with
Fred and come to some arrangement whereby the code
would actually become a part of PureBASIC.
It is terribly difficult to keep track
of which "official" libraries are
current and function correctly;
much less the user-created
libraries...
...once again struggling
with information overload... Joe

elecTRONics DOCtor
{registeredPB windoze95&98}

Edited by - TronDoc on 08 February 2002 07:34:18

Posted: Fri Feb 08, 2002 10:01 am
by BackupUser
Restored from previous forum. Originally posted by El_Choni.

Hi,

I've coded some libraries with stuff I needed and didn't find in PureBasic. As Fred has been implementing this stuff, I've deleted them from my libs. Anyway, I try to use non-standard names to my functions so they don't conflict to newly implemented functions when updating.

I don't think Fred should incorporate my functions to PureBasic as they are, since I'm not an experienced programmer and my code is not as highly optimized as PureBasic's core is. And Fred can't take the risk of assuming all the bugs that user libraries may add, so it's up to you to use them or not.

Anyway, we try to make things work while Fred makes PB better (he's got a lot of work to do by himself).

Bye,

El_Choni

Posted: Fri Feb 08, 2002 7:39 pm
by BackupUser
Restored from previous forum. Originally posted by PB.

> This command is under Math commands in the 2.90 documentation

Oops, my mistake.


PB - Registered PureBasic Coder