[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Random questions
From: |
John W. Eaton |
Subject: |
Re: Random questions |
Date: |
Thu, 20 Dec 2012 15:42:16 -0500 |
On 20-Dec-2012, Júlio Hoffimann wrote:
| Hi John,
|
| There are two things that this function returns, the stream and the
| number. C++ functions can only return one value. It makes more sense
| to return the stream directly, so the other is returned by reference
| in the argument list.
|
| If you inspect the rest of the code, you'll see single_num() is actually never
| called
| according to it's prototype. I'll produce a patch, unless this is not desired
| for some
| other reason.
I don't see a problem leaving it as it is now.
| performance.html for performance considerations) or be conservative and use
| std::strtod() (http://en.cppreference.com/w/cpp/string/byte/strtof)
Octave's single_num function attempts to handle Inf, NaN, and NA. I
don't think strtod does that, so it wouldn't be appropriate to replace
single_num with strtod.
jwe
- Random questions, Júlio Hoffimann, 2012/12/19
- Random questions, John W. Eaton, 2012/12/20
- Re: Random questions, Júlio Hoffimann, 2012/12/20
- Re: Random questions, John W. Eaton, 2012/12/20
- Re: Random questions, Júlio Hoffimann, 2012/12/20
- Re: Random questions, John W. Eaton, 2012/12/20
- Re: Random questions,
John W. Eaton <=
- Re: Random questions, Júlio Hoffimann, 2012/12/26
- Re: Random questions, Daniel J Sebald, 2012/12/26
- Re: Random questions, Júlio Hoffimann, 2012/12/26
- Re: Random questions, Daniel J Sebald, 2012/12/26
- Re: Random questions, Michael Goffioul, 2012/12/20