RosettaCodeData/Task/Exponentiation-order/Action-/exponentiation-order.action
2023-07-01 13:44:08 -04:00

24 lines
488 B
Text

INCLUDE "D2:REAL.ACT" ;from the Action! Tool Kit
PROC Main()
REAL r2,r3,r5,tmp1,tmp2
Put(125) PutE() ;clear screen
IntToReal(2,r2)
IntToReal(3,r3)
IntToReal(5,r5)
PrintE("There is no power operator in Action!")
PrintE("Power function for REAL type is used.")
PrintE("But the precision is insufficient.")
Power(r5,r3,tmp1)
Power(tmp1,r2,tmp2)
Print("(5^3)^2=")
PrintRE(tmp2)
Power(r3,r2,tmp1)
Power(r5,tmp1,tmp2)
Print("5^(3^2)=")
PrintRE(tmp2)
RETURN