Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/ein16/synth/d2/obj_operator.py
ViewVC logotype

Diff of /branches/ein16/synth/d2/obj_operator.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4522, Mon Sep 5 22:57:22 2016 UTC revision 4523, Tue Sep 6 04:07:12 2016 UTC
# Line 97  Line 97 
97  id=id+1  id=id+1
98  #any range  #any range
99    
100  op_cosine = operator(id, "cosine", 1, u'cos', place_left, limit_none, False)  op_cosine = operator(id, "cosine", 1, u'cos', place_left, limit_none, True)
101  op_sine = operator(id+1, "sine", 1, u'sin', place_left, limit_none, False)  op_sine = operator(id+1, "sine", 1, u'sin', place_left, limit_none, True)
102  op_atangent = operator(id+2, "arctangent", 1, u'atan', place_left, limit_none, False)  op_atangent = operator(id+2, "arctangent", 1, u'atan', place_left, limit_none, True)
103  op_tangent = operator(id+3, "tangent", 1, u'tan', place_left, limit_none, False)  op_tangent = operator(id+3, "tangent", 1, u'tan', place_left, limit_none, True)
104  # limit- x must be between -1 and 1 for acos|asine and positive for sqrt.  # limit- x must be between -1 and 1 for acos|asine and positive for sqrt.
105  # to avoid getting a bunch of (inf, or NAN)  # to avoid getting a bunch of (inf, or NAN)
106  # operator arguments are augmented here and in test_eval  # operator arguments are augmented here and in test_eval
107  op_acosine = operator(id+4, "arccosine", 1,  (u'acos(0.01*', u')'), place_split, limit_trig, False)  op_acosine = operator(id+4, "arccosine", 1,  (u'acos(0.01*', u')'), place_split, limit_trig, True)
108  op_asine = operator(id+5, "arcsine", 1,  (u'asin(0.01*', u')'), place_split, limit_trig, False)  op_asine = operator(id+5, "arcsine", 1,  (u'asin(0.01*', u')'), place_split, limit_trig, True)
   
   
109  #note sqrt is 'sqrt' in each branch  #note sqrt is 'sqrt' in each branch
110  op_sqrt = operator(id+6, "sqrt", 1, (u'sqrt(|', u'|)'), place_split, limit_nonzero, False)  op_sqrt = operator(id+6, "sqrt", 1, (u'sqrt(|', u'|)'), place_split, limit_nonzero, False)
111    
112  op_trig=[ op_cosine, op_sine, op_atangent, op_tangent, op_acosine, op_asine, op_sqrt]  op_trig=[ op_cosine, op_sine, op_atangent, op_tangent, op_acosine, op_asine, op_sqrt]
   
113  op_all = op_unary+op_binary+[op_inverse]+op_trig  op_all = op_unary+op_binary+[op_inverse]+op_trig
114    
115  def writeex(e):  def writeex(e):

Legend:
Removed from v.4522  
changed lines
  Added in v.4523

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0