/****************************************************************************/ /* (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 = "glog4"; char *aat_gname = "u = x - 1;\nu2 = y^2;\nu3 = u*u2;\nu4 = u2^2;\ng(x) = u - u2/2 + u3/3 - u4/4"; #define Six (6.0) #define Twenty (20.0) Float aat_g_flt (Float x) { ROUND_NEAR; { Float u = x - One; Float u2 = u*u; Float u3 = u*u2; Float u4 = u2*u2; Float t1 = u; Float t2 = u2/Two; Float t3 = u3/Three; Float t4 = u4/Four; Float res = t1 - t2 + t3 - t4; return (res); } } Interval aat_g_ia (Interval x) { Interval u = ia_shift(x, -One); Interval u2 = ia_sqr(u); Interval u3 = ia_mul(u, u2); Interval u4 = ia_sqr(u2); Interval t1 = u; Interval t2 = ia_scale(u2, One, Two); Interval t3 = ia_scale(u3, One, Three); Interval t4 = ia_scale(u4, One, Four); Interval res = ia_add(ia_sub(t1, t2), ia_sub(t3, t4)); return (res); } AAP aat_g_aa (AAP x) { MemP frame = aa_top(); AAP u = aa_shift(x, -One); AAP u2 = aa_sqr(u); AAP u3 = aa_mul(u, u2); AAP u4 = aa_sqr(u2); AAP t1 = u; AAP t2 = aa_scale(u2, One, Two); AAP t3 = aa_scale(u3, One, Three); AAP t4 = aa_scale(u4, One, Four); AAP res = aa_add(aa_sub(t1, t2), aa_sub(t3, t4)); return (aa_return(frame, res)); } Interval aat_gxd = {-One, Three}; Interval aat_gyd = {-Three, One}; int aat_gn = 16;