Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Bruteforce IEEE Floating Point Numbers
import Data.List -- Zum Vergleich: Eine Liste aller Zahlen im Beispiel-System aus der Vorlesung brutedList2 = [ v * (x * (1/2) + y * (1/4)) * (2^^e) | v <- [-1,1], x <- [0,1], y <- [0,1], e <- [-1,-0,0,1]] -- Eine Liste aller Zahlen im 8er-System vom Aufgabenblatt brutedList8 = [ v * (x * (1/8) + y * (1/16) + z * (1/32)) * (8^e) | v <- [-1,1], x <- [0..7], y <- [0..7], z <- [0..7], e <- [0..7]] -- Hilfsfunktion: Entfernt Duplikate aus der Liste removeDuplicates list = map head (group (sort list)) main = print $ length (removeDuplicates brutedList8)
run
|
edit
|
history
|
help
0
project euler 10, haskell
Lowest Common Ancestor in a Binary Tree
Modular arithmetic with propagating type-checked modulus
Reader
haskell linked list
Derive type class for parameterized data type
Haskell Prime Factorizer
prettier Tasty
divisibleBy a b
ReadablePractice