math.functions: fix memory protection error if exp called on a complex number with a rational real part (reported by prunedtree)
							parent
							
								
									e8378b3dc6
								
							
						
					
					
						commit
						df40d92216
					
				| 
						 | 
				
			
			@ -70,4 +70,7 @@ IN: math.complex.tests
 | 
			
		|||
[ ] [ C{ 1 4 } coth drop ] unit-test
 | 
			
		||||
[ ] [ C{ 1 4 } cot drop ] unit-test
 | 
			
		||||
 | 
			
		||||
[ t ] [ 0.0 pi rect> exp C{ -1 0 } 1.0e-7 ~ ] unit-test
 | 
			
		||||
[ t ] [ 0 pi rect> exp C{ -1 0 } 1.0e-7 ~ ] unit-test
 | 
			
		||||
 | 
			
		||||
[ "C{ 1/2 2/3 }" ] [ C{ 1/2 2/3 } unparse ] unit-test
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
! Copyright (C) 2004, 2008 Slava Pestov.
 | 
			
		||||
! Copyright (C) 2004, 2010 Slava Pestov.
 | 
			
		||||
! See http://factorcode.org/license.txt for BSD license.
 | 
			
		||||
USING: math kernel math.constants math.private math.bits
 | 
			
		||||
math.libm combinators math.order sequences ;
 | 
			
		||||
| 
						 | 
				
			
			@ -62,7 +62,7 @@ M: float exp fexp ; inline
 | 
			
		|||
 | 
			
		||||
M: real exp >float exp ; inline
 | 
			
		||||
 | 
			
		||||
M: complex exp >rect swap fexp swap polar> ; inline
 | 
			
		||||
M: complex exp >rect swap exp swap polar> ; inline
 | 
			
		||||
 | 
			
		||||
<PRIVATE
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue