libm/math: Set errno to ERANGE for pow(0, -y)
POSIX says that the errno for pow(0, -y) should be ERANGE instead of EDOM. https://pubs.opengroup.org/onlinepubs/9699919799/functions/pow.html Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
		
							parent
							
								
									2eafcc78df
								
							
						
					
					
						commit
						98a4f8de47
					
				|  | @ -84,8 +84,7 @@ PORTABILITY | |||
| 	    } | ||||
| 	    if(finite(y)&&y<0.0) { | ||||
| 		/* 0**neg */ | ||||
| 		errno = EDOM; | ||||
| 		return -HUGE_VAL; | ||||
| 		errno = ERANGE; | ||||
| 	    } | ||||
| 	    return z; | ||||
| 	} | ||||
|  |  | |||
|  | @ -50,8 +50,7 @@ | |||
| 	    } | ||||
| 	    if(finitef(y)&&y<0.0f) { | ||||
| 		/* 0**neg */ | ||||
| 		errno = EDOM; | ||||
| 		return -HUGE_VALF; | ||||
| 		errno = ERANGE; | ||||
| 	    } | ||||
| 	    return z; | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue