#! /usr/bin/env python3 # def cosm_sinn ( m, n ): from math import pi from my_library import double_factorial # backslash lets us split the following long line value = double_factorial ( m - 1 ) * double_factorial ( n - 1 ) \ / double_factorial ( m + n ) if ( ( m % 2 == 0 ) and ( n % 2 == 0 ) ): value = value * pi / 2.0 return value def cosm_sinn_test ( ): # from my_library import cosm_sinn print ( '' ) print ( 'm n integral value' ) for m in range ( 2, 5 ): print ( '' ) for n in range ( 2, 5 ): print ( m, n, cosm_sinn ( m, n ) ) return if ( __name__ == "__main__" ): cosm_sinn_test ( )