June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1 @@
0 0^p

View file

@ -0,0 +1,7 @@
/* created by Aykayayciti Earl Lamont Montgomery
April 9th, 2018 */
x = 0
y = 0
z = x**y
> "z=", z

View file

@ -0,0 +1,2 @@
F64 a = 0 ` 0;
Print("0 ` 0 = %5.3f\n", a);

View file

@ -0,0 +1,2 @@
> 0**0
1

View file

@ -1,9 +1,7 @@
zs = Any[zero(Complex),
zero(FloatingPoint),
zero(Rational),
zero(Integer),
zero(Bool)]
const types = (Complex, Float64, Rational, Int, Bool)
for i in zs, j in zs
println(i, "^", j, " = ", i^j, " (", typeof(i^j), ")")
for Tb in types, Te in types
zb, ze = zero(Tb), zero(Te)
r = zb ^ ze
@printf("%10s ^ %-10s = %7s ^ %-7s = %-12s (%s)\n", Tb, Te, zb, ze, r, typeof(r))
end

View file

@ -0,0 +1,11 @@
from decimal import Decimal
from fractions import Fraction
from itertools import product
zeroes = [0, 0.0, 0j, Decimal(0), Fraction(0, 1), -0.0, -0.0j, Decimal(-0.0)]
for i, j in product(zeroes, repeat=2):
try:
ans = i**j
except:
ans = '<Exception raised>'
print(f'{i!r:>15} ** {j!r:<15} = {ans!r}')