I hereby claim:
- I am fabianlischka on github.
- I am fab (https://keybase.io/fab) on keybase.
- I have a public key whose fingerprint is 2BFE 74A9 BBF3 52DB 80B0 B64A 4EEA C244 94F9 1756
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# reprExact is a small helper function that takes a float (currently only Float64) | |
# and returns an "exact" representation of that float. Invariant: | |
# x == eval(parse(reprExact(x))), and even | |
# bits(x) == bits(eval(parse(reprExact(x)))) | |
# Not tested yet: subnormals, signaling NaNs, NaNs with payload | |
function reprExact(x::Float64) | |
w, p, bias = 11, 53, 1023 # 8,24,127 for float32 | |
b = bits(x) |
def naive_add(lis): | |
total = 0 | |
for elem in lis: | |
total += elem | |
return total | |
def recursive_add(lis): | |
if len(lis) == 1: | |
return lis[0] | |
elif len(lis) == 0: |
{ | |
"metadata": { | |
"language": "Julia", | |
"name": "modpi" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |