Concatenate strings at compile-time

2018-05-02 Thread Jonathan M. Wilbur via Digitalmars-d-learn
I have a method that cannot be @nogc only because it concatenates strings for a long exception message, as seen below. throw new ASN1ValuePaddingException ( "This exception was thrown because you attempted to decode " ~ "an INTEGER that

Split Real / Float into Mantissa, Exponent, and Base

2017-03-03 Thread Jonathan M. Wilbur via Digitalmars-d-learn
I have tried to come up with a good way to get the mantissa, exponent, and base from a real number, and I just can't come up with a good cross-platform way of doing it. I know about std.math.frexp(), but that function only gives you another real as the mantissa. I need an integral mantissa,