Andrew Spott: > import std.stdio; > [...] This is the same code of yours, a bit refactored:
import std.stdio: writefln;
template Tuple(T...) { alias T Tuple; }
void computeEpsilon(T)() {
T ep = 1;
T n = 1;
while ((ep + n) != n)
ep /= 2;
writefln("%.30f type: %s", ep, typeid(T));
}
void main() {
foreach (T; Tuple!(float, double, real))
computeEpsilon!(T)();
}
Bye,
bearophile
