/****************************************************************************/ /* (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 = "g7"; char *aat_gname = "y = -range(x);\nd = x-y;\nt = d(1-d^2);\nh = t/(1+t^2);\nu = x+h;\nv = x+h;\ng = u^2 + v^2 + 2uv - 1/4"; Float aat_g_flt (Float x) { ROUND_NEAR; { Float y = -x; Float d = x - y; Float t = Quarter * d * (One - d*d); Float h = t / (1 + t*t); Float u = x + h; Float v = y + h; Float u2 = u*u; Float v2 = v*v; Float uv = u*v; Float m = u2 + v2 + uv + uv; Float res = m - Quarter; 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 h = ia_div(t, ia_shift(ia_sqr(t), One)); Interval u = ia_add(x, h); Interval v = ia_add(y, h); Interval u2 = ia_sqr(u); Interval v2 = ia_sqr(v); Interval uv = ia_mul(u, v); Interval m = ia_add(ia_add(u2, v2), ia_add(uv, uv)); Interval res = ia_shift(m, - Quarter); 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 h = aa_div(t, aa_shift(aa_sqr(t), One)); AAP u = aa_add(x, h); AAP v = aa_add(y, h); AAP u2 = aa_sqr(u); AAP v2 = aa_sqr(v); AAP uv = aa_mul(u, v); AAP m = aa_add(aa_add(u2, v2), aa_add(uv, uv)); AAP res = aa_shift(m, - Quarter); return (aa_return(frame, res)); } Interval aat_gxd = {-Two, Two}; Interval aat_gyd = {-Two, Two}; int aat_gn = 16;