PDA

View Full Version : ? about raising floating point numeric values to powers and fractional powers



GSAC3
09-10-2007, 19:22
Eros:

Does thinBasic have an equivalent operator to ^, as used in other basics, for raising floating point numbers to powers and fractional powers (i.e. taking roots)? If not, is this accomplished in some other way or with an intrinsic function designed for this purpose in thinBasic?

Don B.

ErosOlmi
09-10-2007, 19:54
Do you mean something like that:



dim n as ext

n = 2
msgbox 0, str$(n^2)
n=4
msgbox 0, str$(n^(0.5))
n=1.5
msgbox 0, str$(n^4.5)


The above is perfectly valid syntax in thinBasic.
If this is not what you asked, can you give me some more info?

Thanks
Eros

GSAC3
09-10-2007, 20:35
Eros:

Yes, this is exactly what I was talking about.

I could not find the ^ operator listed in the thinBasic help file, and thought it may not be available.

Thanks for your reply.

Don B.

ErosOlmi
09-10-2007, 21:56
I need to check help and add what is missing.
Thanks for letting me know.

Ciao
Eros