[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pkl,std: add `stof' and `stod'
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] pkl,std: add `stof' and `stod' |
Date: |
Thu, 16 Mar 2023 09:20:45 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi Mohammad.
I like the patch.
> +float pvm_stof (const char *str)
> +{
> + return (float) atof (str);
> +}
> +
> +double pvm_stod (const char *str)
> +{
> + return atof (str);
> +}
atof doesn't detect errors. What about using strtod instead? Then the
instructions can push PVM_NULL on the stack in case of an error, and the
stof/stod utility functions can raise exceptions accordingly.
- set floating point, Philippe Marchesseault, 2023/03/11
- Re: set floating point, Mohammad-Reza Nabipoor, 2023/03/13
- [PATCH] pkl,std: add `stof' and `stod', Mohammad-Reza Nabipoor, 2023/03/16
- Re: [PATCH] pkl,std: add `stof' and `stod',
Jose E. Marchesi <=
- [PATCH v2] pkl,std: add `stof' and `stod', Mohammad-Reza Nabipoor, 2023/03/21
- Re: [PATCH v2] pkl,std: add `stof' and `stod', Jose E. Marchesi, 2023/03/21
- Re: [PATCH v2] pkl,std: add `stof' and `stod', Mohammad-Reza Nabipoor, 2023/03/21
- Re: [PATCH v2] pkl,std: add `stof' and `stod', Jose E. Marchesi, 2023/03/21
- [PATCH v3] pkl,std: add `stof' and `stod', Mohammad-Reza Nabipoor, 2023/03/21
- Re: [PATCH v3] pkl,std: add `stof' and `stod', Jose E. Marchesi, 2023/03/21
- Re: [PATCH v3] pkl,std: add `stof' and `stod', Mohammad-Reza Nabipoor, 2023/03/22