Skip to content

Instantly share code, notes, and snippets.

View hannorein's full-sized avatar

Hanno Rein hannorein

View GitHub Profile
@Marc-B-Reynolds
Marc-B-Reynolds / output.md
Last active December 27, 2025 05:41
brute force testing of 1/sqrt functions
click for range breakdown

checking on [3f800000,40000000] [1.000000e+00,2.000000e+00]

func e max ULP CR FR 2 ULP > 2 ULP CR% FR% 2 ULP% > 2 ULP%
vrsqrte_f32 -- 4947968 103 225 216 8388065 0.001228 0.002682 0.002575 99.993515
FRSR_Mon0 -- 564177 3 8 6 8388592 0.000036 0.000095 0.000072 99.999797
FRSR_Deg0 -- 403258 0 0 0 8388609 0.000000 0.000000 0.000000 100.000000
FRSR_Mon1 -- 14751 230 464 466 8387449 0.002742 0.005531 0.005555 99.986172
@ctmakro
ctmakro / ipython_display.py
Last active April 15, 2024 03:22
Display numpy ndarray as Image in Jupyter/IPython notebook
# if input image is in range 0..1, please first multiply img by 255
# assume image is ndarray of shape [height, width, channels] where channels can be 1, 3 or 4
def imshow(img):
import cv2
import IPython
_,ret = cv2.imencode('.jpg', img)
i = IPython.display.Image(data=ret)
IPython.display.display(i)
@Microno95
Microno95 / Fast_Variational_Equations_Implementation.ipynb
Last active May 23, 2017 20:25
Poincaré Sections - Chaos - With Variations
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chris-taylor
chris-taylor / interpreter.hs
Last active August 29, 2015 14:04
Interpreter for Hanno's made-up assembly language
import Data.Map (Map, (!), insert, empty)
import Control.Monad.State (StateT, put, get, liftIO, evalStateT)
type Val = Int
type Var = String
data Instruction =
Set Val Var
| Print Var
| Add Var Var Var
@cotdp
cotdp / gmetric-cpu-temp.sh
Created November 22, 2011 22:09
this script read the core(s) temperature using lm sensors then calculate the average and send it to the ganglia using gmetric
#!/bin/sh
# this script read the core(s) temperature using lm sensors then calculate the average
# and send it to the ganglia using gmetric
# Based on the original from: http://computational.engineering.or.id/LM_Sensors#Integrasi_Dengan_Ganglia
# assumes that the lines reported by lm sensors are formated like this
# Core 0: +48.0°C (high = +90.0°C, crit = +100.0°C)
SENSORS=/usr/bin/sensors
GMETRIC=/usr/bin/gmetric