tanasinn == -1 とするコードを解き明かしたら

たいして面白くはなかった件。

import math as m
"""
tan(a)*sin(n) == -1.0
tan(a) == -1.0 / sin(n)
tan(a) == p
a == atan(p)
"""
print('*** tanasinn == -1 ***')
for i in range(1, 6):
  sinn = m.sin(i)
  tana = -1.0 / sinn
  p = tana
  a = m.atan(p)
  print ('n = ' + str(i))
  print(' tana == ' + str(tana))
  print(' sinn == ' + str(sinn))
  print(' tanasinn == '+ str(tana*sinn))
  print(' a == ' + str(a))

出力

*** tanasinn == -1 ***
n = 1
 tana == -1.1883951057781212
 sinn == 0.8414709848078965
 tanasinn == -1.0
 a == -0.871274682446377
n = 2
 tana == -1.0997501702946164
 sinn == 0.9092974268256817
 tanasinn == -1.0
 a == -0.8328682075004891
n = 3
 tana == -7.086167395737187
 sinn == 0.1411200080598672
 tanasinn == -1.0
 a == -1.4306020767668275