Added various geom functions to runtime including asin, acos, tan
This commit is contained in:
		
							parent
							
								
									d785d40935
								
							
						
					
					
						commit
						38a60b4d84
					
				
							
								
								
									
										
											BIN
										
									
								
								bin/ikarus
								
								
								
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/ikarus
								
								
								
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -77,6 +77,40 @@ ikrt_fl_cos(ikp x, ikpcb* pcb){ | |||
|   return r; | ||||
| } | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fl_tan(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|   ref(r, -vector_tag) = (ikp)flonum_tag; | ||||
|   flonum_data(r) = tan(flonum_data(x)); | ||||
|   return r; | ||||
| } | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fl_asin(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|   ref(r, -vector_tag) = (ikp)flonum_tag; | ||||
|   flonum_data(r) = asin(flonum_data(x)); | ||||
|   return r; | ||||
| } | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fl_acos(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|   ref(r, -vector_tag) = (ikp)flonum_tag; | ||||
|   flonum_data(r) = acos(flonum_data(x)); | ||||
|   return r; | ||||
| } | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fl_atan(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|   ref(r, -vector_tag) = (ikp)flonum_tag; | ||||
|   flonum_data(r) = atan(flonum_data(x)); | ||||
|   return r; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fl_sqrt(ikp x, ikpcb* pcb){ | ||||
|  | @ -95,18 +129,6 @@ ikrt_fl_log(ikp x, ikpcb* pcb){ | |||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fl_atan(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|   ref(r, -vector_tag) = (ikp)flonum_tag; | ||||
|   flonum_data(r) = atan(flonum_data(x)); | ||||
|   return r; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fx_sin(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|  | @ -124,10 +146,26 @@ ikrt_fx_cos(ikp x, ikpcb* pcb){ | |||
| } | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fx_sqrt(ikp x, ikpcb* pcb){ | ||||
| ikrt_fx_tan(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|   ref(r, -vector_tag) = (ikp)flonum_tag; | ||||
|   flonum_data(r) = sqrt(unfix(x)); | ||||
|   flonum_data(r) = tan(unfix(x)); | ||||
|   return r; | ||||
| } | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fx_asin(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|   ref(r, -vector_tag) = (ikp)flonum_tag; | ||||
|   flonum_data(r) = asin(unfix(x)); | ||||
|   return r; | ||||
| } | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fx_acos(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|   ref(r, -vector_tag) = (ikp)flonum_tag; | ||||
|   flonum_data(r) = acos(unfix(x)); | ||||
|   return r; | ||||
| } | ||||
| 
 | ||||
|  | @ -139,6 +177,15 @@ ikrt_fx_atan(ikp x, ikpcb* pcb){ | |||
|   return r; | ||||
| } | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fx_sqrt(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|   ref(r, -vector_tag) = (ikp)flonum_tag; | ||||
|   flonum_data(r) = sqrt(unfix(x)); | ||||
|   return r; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| ikp | ||||
| ikrt_fx_log(ikp x, ikpcb* pcb){ | ||||
|   ikp r = ik_alloc(pcb, flonum_size) + vector_tag; | ||||
|  |  | |||
|  | @ -86,7 +86,7 @@ | |||
|     [asin                                       S ba se] | ||||
|     [assert                                     C ba] | ||||
|     [assertion-violation                        S ba] | ||||
|     [atan                                       S ba se] | ||||
|     [atan                                       C ba se] | ||||
|     [boolean=?                                  C ba] | ||||
|     [boolean?                                   C ba se] | ||||
|     [car                                        C ba se] | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Abdulaziz Ghuloum
						Abdulaziz Ghuloum