I'd like to convert a double to a string in a pure function. I'm confused as to why this isn't pure:
wstring fromNumber(double n) pure {
import std.format;
return std.format.format!("%s"w)(n);
}
Is there a way to implement this function in a pure
way without having to reimplement the logic for converting a double to a base10 string?