/****************************************************************************/ /* (C) Copyright 1993 Universidade Estadual de Campinas (UNICAMP) */ /* Campinas, SP, Brazil */ /* */ /* This file can be freely distributed, modified, and used for any */ /* non-commercial purpose, provided that this copyright and authorship */ /* notice be included in any copy or derived version of this file. */ /* */ /* DISCLAIMER: This software is offered ``as is'', without any guarantee */ /* as to fitness for any particular purpose. Neither the copyright */ /* holder nor the authors or their employers can be held responsible for */ /* any damages that may result from its use. */ /****************************************************************************/ char *aat_gtag = "gsin3"; char *aat_gname = "x2 = x^2;\nt1 = x;\nt3 = -t1*x2/6;\nt5 = -t3*x2/20;\ng(x) = t1 + t2 + t3"; #define Six (6.0) #define Twenty (20.0) Float aat_g_flt (Float x) { ROUND_NEAR; { Float x2 = x*x; Float t1 = x; Float t3 = -t1*x2/Six; Float t5 = -t3*x2/Twenty; Float res = t1 + t3 + t5; return (res); } } Interval aat_g_ia (Interval x) { Interval x2 = ia_sqr(x); Interval t1 = x; Interval t3 = ia_affine(ia_mul(t1, x2), One, -Six, Zero, Zero); Interval t5 = ia_affine(ia_mul(t3, x2), One, -Twenty, Zero, Zero); Interval res = ia_add(ia_add(t1, t3), t5); return (res); } AAP aat_g_aa (AAP x) { MemP frame = aa_top(); AAP x2 = aa_sqr(x); AAP t1 = x; AAP t3 = aa_affine(aa_mul(t1, x2), One, -Six, Zero, Zero); AAP t5 = aa_affine(aa_mul(t3, x2), One, -Twenty, Zero, Zero); AAP res = aa_add(aa_add(t1, t3), t5); return (aa_return(frame, res)); } Interval aat_gxd = {-Two, Two}; Interval aat_gyd = {-Two, Two}; int aat_gn = 16;