/****************************************************************************/ /* (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 = "g8"; char *aat_gname = "y = -range(x);\nd = x-y;\nt = d(1-d^2);\ni = 1/(1 + t^2);\nh = t*i;\ng = i"; Float aat_g_flt (Float x) { ROUND_NEAR; { Float y = -x; Float d = x - y; Float t = Quarter * d * (One - d*d); Float i = One / (One + t*t); /* Float h = t * i; */ Float res = i; return (res); } } Interval aat_g_ia (Interval x) { Interval y = ia_neg(x); Interval d = ia_sub(x, y); Interval t = ia_mul(d, ia_affine(ia_sqr(d), -One, Four, Quarter, Zero)); Interval i = ia_inv(ia_shift(ia_sqr(t), One)); /* Interval h = ia_mul(t, i); */ Interval res = i; return (res); } AAP aat_g_aa (AAP x) { MemP frame = aa_top(); AAP y = aa_from_interval(ia_neg(aa_range(x))); AAP d = aa_sub(x, y); AAP t = aa_mul(d, aa_affine(aa_sqr(d), -One, Four, Quarter, Zero)); AAP i = aa_inv(aa_shift(aa_sqr(t), One)); /* AAP h = aa_mul(t, i); */ AAP res = i; return (aa_return(frame, res)); } Interval aat_gxd = {-Two, Two}; Interval aat_gyd = {-Two, Two}; int aat_gn = 16;