Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
9
Task/Exponentiation-order/Ada/exponentiation-order.adb
Normal file
9
Task/Exponentiation-order/Ada/exponentiation-order.adb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
with Ada.Text_IO;
|
||||
|
||||
procedure Exponentation_Order is
|
||||
use Ada.Text_IO;
|
||||
begin
|
||||
-- Put_Line ("5**3**2 : " & Natural'(5**3**2)'Image);
|
||||
Put_Line ("(5**3)**2 : " & Natural'((5**3)**2)'Image);
|
||||
Put_Line ("5**(3**2) : " & Natural'(5**(3**2))'Image);
|
||||
end Exponentation_Order;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
p 5**3**2,
|
||||
(5**3)**2,
|
||||
5**(3**2)
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
console.log(5 ** 3 ** 2);
|
||||
console.log(5 ** (3 ** 2));
|
||||
console.log((5 ** 3) ** 2);
|
||||
console.log(Math.pow(Math.pow(5, 3), 2));
|
||||
console.log(Math.pow(5, Math.pow(3, 2)));
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
5^3^2;
|
||||
(5^3)^2;
|
||||
5^(3^2);
|
||||
(5**3)**2;
|
||||
5^^3^^2;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
local fmt = require "fmt"
|
||||
|
||||
local ops = { "5 ^ 3 ^ 2", "(5 ^ 3) ^ 2", "5 ^ (3 ^ 2)" }
|
||||
local res = { 5 ^ 3 ^ 2, (5 ^ 3) ^ 2, 5 ^(3 ^ 2) }
|
||||
for i = 1, #ops do
|
||||
fmt.print("%-13s -> %.0f", ops[i], res[i])
|
||||
end
|
||||
11
Task/Exponentiation-order/Rebol/exponentiation-order.rebol
Normal file
11
Task/Exponentiation-order/Rebol/exponentiation-order.rebol
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
exprs: [
|
||||
[5 ** 3 ** 2]
|
||||
[(5 ** 3) ** 2]
|
||||
[5 ** (3 ** 2)]
|
||||
[power power 5 3 2] ;-- functions too
|
||||
[power 5 power 3 2]
|
||||
]
|
||||
|
||||
foreach expr exprs [
|
||||
print [pad mold/only expr 18 "==" do expr]
|
||||
]
|
||||
3
Task/Exponentiation-order/Uiua/exponentiation-order.uiua
Normal file
3
Task/Exponentiation-order/Uiua/exponentiation-order.uiua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
ⁿ2ⁿ3 5
|
||||
ⁿ2(ⁿ3 5)
|
||||
ⁿ(ⁿ2 3) 5
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
WScript.StdOut.WriteLine "5^3^2 => " & 5^3^2
|
||||
WScript.StdOut.WriteLine "(5^3)^2 => " & (5^3)^2
|
||||
WScript.StdOut.WriteLine "5^(3^2) => " & 5^(3^2)
|
||||
Loading…
Add table
Add a link
Reference in a new issue