mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Added more casts for the powf() function parameters.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14969 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdlib_strtof.c,v 1.7 2005-05-30 09:50:43 obarthel Exp $
|
||||
* $Id: stdlib_strtof.c,v 1.8 2005-05-30 18:28:45 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -326,7 +326,7 @@ strtof(const char *str, char ** ptr)
|
||||
float divisor;
|
||||
|
||||
/* A negative exponent means division. */
|
||||
divisor = powf(radix,exponent);
|
||||
divisor = powf((float)radix,(float)exponent);
|
||||
if(divisor != 0.0)
|
||||
{
|
||||
new_sum = sum / divisor;
|
||||
@ -343,7 +343,7 @@ strtof(const char *str, char ** ptr)
|
||||
else
|
||||
{
|
||||
/* A positive exponent means multiplication. */
|
||||
new_sum = sum * powf(radix,exponent);
|
||||
new_sum = sum * powf((float)radix,(float)exponent);
|
||||
if(new_sum < sum)
|
||||
error = ERANGE;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user