Use nanf() instead of nan() in single-precision float libm math functions
This patch reduces code size for a few single-precision float math functions, by using nanf() instead of nan() where required.
This commit is contained in:
		
				
					committed by
					
						 Corinna Vinschen
						Corinna Vinschen
					
				
			
			
				
	
			
			
			
						parent
						
							d451d9ec78
						
					
				
				
					commit
					b644774b8f
				
			| @@ -31,7 +31,7 @@ | |||||||
| 	if(fabsf(x)>1.0f) { | 	if(fabsf(x)>1.0f) { | ||||||
| 	    /* acosf(|x|>1) */ | 	    /* acosf(|x|>1) */ | ||||||
| 	    errno = EDOM; | 	    errno = EDOM; | ||||||
| 	    return (float) nan(""); | 	    return nanf(""); | ||||||
| 	} else | 	} else | ||||||
| 	    return z; | 	    return z; | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -38,7 +38,7 @@ | |||||||
| 	if(fabsf(x)>1.0f) { | 	if(fabsf(x)>1.0f) { | ||||||
| 	    /* asinf(|x|>1) */ | 	    /* asinf(|x|>1) */ | ||||||
| 	    errno = EDOM; | 	    errno = EDOM; | ||||||
| 	    return (float)nan(""); | 	    return nanf(""); | ||||||
| 	} else | 	} else | ||||||
| 	    return z; | 	    return z; | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -41,7 +41,7 @@ | |||||||
| 	} else {  | 	} else {  | ||||||
| 	    /* logf(x<0) */ | 	    /* logf(x<0) */ | ||||||
| 	    errno = EDOM; | 	    errno = EDOM; | ||||||
| 	    return nan(""); | 	    return nanf(""); | ||||||
|         } |         } | ||||||
| #endif | #endif | ||||||
| } | } | ||||||
|   | |||||||
| @@ -41,7 +41,7 @@ | |||||||
| 	    } else {  | 	    } else {  | ||||||
| 		/* log10f(x<0) */ | 		/* log10f(x<0) */ | ||||||
| 		errno = EDOM; | 		errno = EDOM; | ||||||
| 		return nan(""); | 		return nanf(""); | ||||||
|             } |             } | ||||||
| 	} else | 	} else | ||||||
| 	    return z; | 	    return z; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user