Exponentiation operator: Difference between revisions

Content added Content deleted
(→‎{{header|AutoHotkey}}: added code and removed incorrect notice)
Line 700: Line 700:
<lang perl6>say pow .75, -5;
<lang perl6>say pow .75, -5;
say .75 *** -5;</lang>
say .75 *** -5;</lang>

=={{header|PL/I}}==
<lang PL/I>
declare exp generic
iexp when (fixed binary, fixed binary),
fexp when (float, fixed binary);
iexp: procedure (m, n) returns (fixed binary (31));
declare (m, n) fixed binary (31) nonassignable;
declare exp fixed binary (31) initial (m), i fixed binary;
if m = 0 & n = 0 then signal error;
if n = 0 then return (1);
do i = 2 to n;
exp = exp * m;
end;
return (exp);
end iexp;
fexp: procedure (a, n) returns (float);
declare (a float, n fixed binary (31)) nonassignable;
declare exp float initial (a), i fixed binary;
if a = 0 & n = 0 then signal error;
if n = 0 then return (1);
do i = 2 to n;
exp = exp * a;
end;
return (exp);
end fexp;
</lang>


=={{header|PowerShell}}==
=={{header|PowerShell}}==