Name: Anonymous 2011-04-05 22:27
I've been watching my terminal for an hour now. I still haven't found infinity.
> +inf.0
+inf.0
findInfinity :: [Integer] -> Integer
findInfinity [] = error "could not find infinity"
findInfinity [x] = x
findInfinity (x1:x2:xs) = if x1 == x2
then x1 -- numbers stopped increasing, it must be infinity
else findInfinity (x2:xs)
findInfinity [0..]
import infinity
print(infinity.max())
#include <iostream>
#include <limits>
int main() {
std::cout << numeric_limits<float>::infinity() << std::endl;
return 0;
}#! /usr/bin/python
print __import__("numpy").inf