Re: [gccsdk] [Bug 250] New: GCC 4.7.4 Rel 1 Dev 2014-01-08: sqrt function

2014-03-24 Thread Duncan Moore
On 22/03/2014 20:16, Bob Brand wrote: Hello Duncan, In message you wrote: printf("%f\n",sqrt(2.0)); Looks like you have fallen in a classic C pitfall: passing a double argument to a vararg/stdarg function but interpreting it as float. No, "%f" is a correct format specifier for double.

Re: [gccsdk] [Bug 250] New: GCC 4.7.4 Rel 1 Dev 2014-01-08: sqrt function

2014-03-22 Thread Bob Brand
Hello Duncan, In message you wrote: > printf("%f\n",sqrt(2.0)); Looks like you have fallen in a classic C pitfall: passing a double argument to a vararg/stdarg function but interpreting it as float. Try either: printf("%lf\n", sqrt(2.0)); Or: printf("%f\n", (float) sqrt(2.0)); Reason: f

[gccsdk] [Bug 250] New: GCC 4.7.4 Rel 1 Dev 2014-01-08: sqrt function

2014-03-18 Thread bugzilla-daemon
http://www.riscos.info/bugzilla3/show_bug.cgi?id=250 Summary: GCC 4.7.4 Rel 1 Dev 2014-01-08: sqrt function Product: GCC/GCCSDK Version: other Platform: Other OS/Version: RISC OS Status: NEW Severity: normal Priorit