Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void getScaler(double value, double &scaler, double &scalerReciprocal) {
- int e = <exponent of value>;
- if (e<-1022) { scaler=2^-1022; scalerReciprocal = 2^1022; }
- } else if (e>1022) { scaler=2^1022; scalerReciprocal = 2^-1022; }
- } else { scaler=2^e; scalerReciprocal = 2^(2046-e); }
- }
- double frexp (double x, int* exp);
Add Comment
Please, Sign In to add comment