changed over/underflow for exp()
This commit is contained in:
		
							parent
							
								
									a3bd2c6734
								
							
						
					
					
						commit
						8c9149b058
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -36,12 +36,12 @@ exp(double x)
 | 
			
		|||
	int	n;
 | 
			
		||||
	int	negative = x < 0;
 | 
			
		||||
 | 
			
		||||
	if (x <= M_LN_MIN_D) {
 | 
			
		||||
		if (x < M_LN_MIN_D) errno = ERANGE;
 | 
			
		||||
	if (x < M_LN_MIN_D) {
 | 
			
		||||
		errno = ERANGE;
 | 
			
		||||
		return 0.0;
 | 
			
		||||
	}
 | 
			
		||||
	if (x >= M_LN_MAX_D) {
 | 
			
		||||
		if (x > M_LN_MAX_D) errno = ERANGE;
 | 
			
		||||
	if (x > M_LN_MAX_D) {
 | 
			
		||||
		errno = ERANGE;
 | 
			
		||||
		return HUGE_VAL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue