From: Eric S. Raymond Date: Sat, 14 Feb 2004 16:59:28 +0000 (+0000) Subject: sin. and cos. require the math library. X-Git-Tag: 1.0~102 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=bfa26e2e0501c8f31272ff9eeed2e4e000f9f173;p=mad.git sin. and cos. require the math library. --- diff --git a/mad b/mad index a9481c5..559c05c 100755 --- a/mad +++ b/mad @@ -468,7 +468,7 @@ def p_function_application(t): 'expression : FUNCALL application' t[0] = ('apply', t[1], tuple(t[2])) global headers - if t[1] in ('elog.', 'sqrt.') and "math" not in headers: + if t[1] in madmath and "math" not in headers: headers.append("math") def p_expression_funcall0(t): @@ -493,6 +493,9 @@ yacc.yacc() import sys, re +# These will require the math library. +# All but tan. are in the manual examples. +madmath = ('elog.','sqrt.','sin.','cos.','tan.',) # Map MAD intrinsics to C library functions madfunc_map = {'elog':'log'}