X-Git-Url: https://scm.cri.ensmp.fr/git/Faustine.git/blobdiff_plain/1059e1cc0c2ecfa237406949aa26155b6a5b9154..66f23d4fabf89ad09adbd4dfc15ac6b5b2b7da83:/interpretor/preprocessor/faust-0.9.47mr3/compiler/extended/acosprim.cpp diff --git a/interpretor/preprocessor/faust-0.9.47mr3/compiler/extended/acosprim.cpp b/interpretor/preprocessor/faust-0.9.47mr3/compiler/extended/acosprim.cpp deleted file mode 100644 index 03007b4..0000000 --- a/interpretor/preprocessor/faust-0.9.47mr3/compiler/extended/acosprim.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "xtended.hh" -#include "Text.hh" -#include - -#include "floats.hh" - -class AcosPrim : public xtended -{ - - public: - - AcosPrim() : xtended("acos") {} - - virtual unsigned int arity () { return 1; } - - virtual bool needCache () { return true; } - - virtual Type infereSigType (const vector& args) - { - assert (args.size() == 1); - return floatCast(args[0]); - } - - virtual void sigVisit (Tree sig, sigvisitor* visitor) {} - - virtual int infereSigOrder (const vector& args) { - return args[0]; - } - - - virtual Tree computeSigOutput (const vector& args) { - num n; - if (isNum(args[0],n)) { - return tree(acos(double(n))); - } else { - return tree(symbol(), args[0]); - } - } - - virtual string generateCode (Klass* klass, const vector& args, const vector& types) - { - assert (args.size() == arity()); - assert (types.size() == arity()); - - return subst("acos$1($0)", args[0], isuffix()); - } - - virtual string generateLateq (Lateq* lateq, const vector& args, const vector& types) - { - assert (args.size() == arity()); - assert (types.size() == arity()); - - return subst("\\arccos\\left($0\\right)", args[0]); - } -}; - - -xtended* gAcosPrim = new AcosPrim(); - -