Timeline for answer to Sandbox for Proposed Challenges by Rosario
Current License: CC BY-SA 4.0
Post Revisions
23 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 8 at 9:41 | comment | added | Explorer09 | There is no float80 format in ieee754. You might be referring to x86 extended-precision format instead. | |
| Apr 8 at 8:25 | comment | added | Rosario | @Explorer09 I mean only float that have 64 bits for store the digits as float 80 ieee754 | |
| Apr 7 at 17:21 | comment | added | Explorer09 | By the way, you didn't seem to realize there is a standard called IEEE 754 that most floating point hardware comply to. Better learn it. IEEE 754 float64 has 11 bits of exponents and 53 bits of significand precision. | |
| Apr 7 at 17:15 | comment | added | Explorer09 | With multiprecision float library (such as GNU MPFR), the 19-digit limit can be bypassed, and the explicit guard would make no sense. In short you shouldn't care about the limit. | |
| Apr 7 at 14:40 | comment | added | Rosario | I asked Google, it seems they call it float 80, that has 64 bits for store digits that result to them as 18 19 decimal digits... google.com/… | |
| Apr 7 at 14:19 | comment | added | Rosario | @Explorer09 trunc 10 123.0 is ok , what is not ok is trunc 17 123.0 ; 17+3=20 this suppose a 20 digit number, but a float can have only 19 digits, so there is one error | |
| Apr 7 at 11:48 | comment | added | Explorer09 |
For (2.) it's not an error for overprecision. It's as if you have the input truncdgt 10 123.0 and it returns the same floating point value because there are no fraction digits to round. If you want to warn the client (or user or whoever) about too much precision, I suggest make it an Undefined Behavior for the purpose of this challenge. In short, either allow it and return the same value, or make it UB.
|
|
| Apr 7 at 10:28 | comment | added | Rosario | For me for 2, it can not return one float if error condition is found. NaN will be perfect because it is a float different of other float. This can not be ok if sys rise one exception | |
| Apr 7 at 7:18 | history | edited | Rosario | CC BY-SA 4.0 |
added 16 characters in body
|
| Apr 7 at 7:05 | history | edited | Rosario | CC BY-SA 4.0 |
added 16 characters in body
|
| Apr 7 at 6:11 | history | edited | Rosario | CC BY-SA 4.0 |
added 85 characters in body
|
| Apr 7 at 5:54 | history | edited | Rosario | CC BY-SA 4.0 |
deleted 4 characters in body
|
| Apr 7 at 5:40 | history | edited | Rosario | CC BY-SA 4.0 |
added 92 characters in body
|
| Apr 7 at 5:30 | history | edited | Rosario | CC BY-SA 4.0 |
added 92 characters in body
|
| Apr 7 at 2:22 | comment | added | Rosario | @Explorer09 all in binary, base and exponent | |
| Apr 7 at 2:20 | history | edited | Rosario | CC BY-SA 4.0 |
added 3485 characters in body
|
| Apr 6 at 1:11 | comment | added | Explorer09 | (1.) Should the floating point be stored internally in binary or in decimal? This affects rounding precision in the output. (2.) If the digit position of the round or trunc function exceeds the precision supported by the floating point type, then the number should return as is. NaN is not designed for this purpose. | |
| Apr 5 at 7:49 | history | edited | Rosario | CC BY-SA 4.0 |
deleted 5 characters in body
|
| Apr 5 at 7:43 | history | edited | Rosario | CC BY-SA 4.0 |
deleted 5 characters in body
|
| Apr 5 at 7:36 | history | edited | Rosario | CC BY-SA 4.0 |
deleted 5 characters in body
|
| Apr 5 at 7:15 | history | edited | Rosario | CC BY-SA 4.0 |
added 10 characters in body
|
| Apr 5 at 7:08 | history | edited | Rosario | CC BY-SA 4.0 |
added 10 characters in body
|
| Apr 5 at 6:21 | history | answered | Rosario | CC BY-SA 4.0 |