fork download
  1. import math
  2.  
  3. def daneluk_angles_v(epsilon):
  4. # 1/2 (sin(beta2) - sin(beta1)) = m
  5. # m = 0.01 ... 0.5
  6. v_angles_list = []
  7. m = epsilon
  8. beta1 = 0.0
  9. while math.sin(beta1) < 1.0:
  10. print("sin b2: ", 2*m + math.sin(beta1))
  11. beta2 = math.asin(2*m + math.sin(beta1))
  12. v_angles_list.append(math.degrees(beta2))
  13.  
  14. beta1 = beta2
  15.  
  16. return v_angles_list
  17.  
  18. print(daneluk_angles_v(0.01))
Runtime error #stdin #stdout #stderr 0.03s 9984KB
stdin
Standard input is empty
stdout
sin b2:  0.02
sin b2:  0.04
sin b2:  0.06
sin b2:  0.08
sin b2:  0.1
sin b2:  0.12000000000000001
sin b2:  0.14
sin b2:  0.16
sin b2:  0.18
sin b2:  0.19999999999999998
sin b2:  0.21999999999999997
sin b2:  0.23999999999999996
sin b2:  0.25999999999999995
sin b2:  0.27999999999999997
sin b2:  0.3
sin b2:  0.32
sin b2:  0.34
sin b2:  0.36000000000000004
sin b2:  0.38000000000000006
sin b2:  0.4000000000000001
sin b2:  0.4200000000000001
sin b2:  0.4400000000000001
sin b2:  0.46000000000000013
sin b2:  0.48000000000000015
sin b2:  0.5000000000000002
sin b2:  0.5200000000000002
sin b2:  0.5400000000000003
sin b2:  0.5600000000000003
sin b2:  0.5800000000000003
sin b2:  0.6000000000000003
sin b2:  0.6200000000000003
sin b2:  0.6400000000000003
sin b2:  0.6600000000000004
sin b2:  0.6800000000000004
sin b2:  0.7000000000000004
sin b2:  0.7200000000000004
sin b2:  0.7400000000000004
sin b2:  0.7600000000000005
sin b2:  0.7800000000000005
sin b2:  0.8000000000000005
sin b2:  0.8200000000000005
sin b2:  0.8400000000000005
sin b2:  0.8600000000000005
sin b2:  0.8800000000000006
sin b2:  0.9000000000000006
sin b2:  0.9200000000000006
sin b2:  0.9400000000000006
sin b2:  0.9600000000000006
sin b2:  0.9800000000000006
sin b2:  1.0000000000000007
stderr
Traceback (most recent call last):
  File "./prog.py", line 18, in <module>
  File "./prog.py", line 11, in daneluk_angles_v
ValueError: math domain error