added silly conversion

This commit is contained in:
2017-07-30 18:39:10 -04:00
parent 428360db07
commit 10817f077c
4 changed files with 24 additions and 8 deletions

View File

@@ -84,3 +84,7 @@ char* silly_to_string(silly s) {
return res;
}
double silly_to_double(silly s) {
return ((double)s.before + ((double)s.after)/(double)0xffffffff) * (s.sign ? -1 : 1);
}