How can exponents be used in Turbo Pascal without the ^ operator?

  • Thread starter Thread starter The Grimmus
  • Start date Start date
  • Tags Tags
    Exponents Pascal
AI Thread Summary
The discussion centers on the use of the exponentiation operator in programming languages, specifically mentioning that Pascal does not have a dedicated exponentiation operator. Instead, it offers built-in functions such as exp() and ln() that can be used to achieve exponentiation through composition. The formula exp(y*LN(x)) effectively calculates xy, providing a workaround for exponentiation in Pascal. A link to a relevant resource was also shared for further reference.
The Grimmus
Messages
199
Reaction score
0
I'm doing a projext for school and I need to know how to use the ^ operator or if it even exists i looked everywhere and couldent find it.
 
Computer science news on Phys.org
thanks
 
Pascal, IIRC, doesn't have an exponentiation operator, but it does have built-in exp() and ln() functions, which can be composed as:

exp(y*LN(x))

which is the same as xy.

- Warren
 
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Back
Top