/****************************************************************************/ /* (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 = "g2"; char *aat_gname = "y = 27/16;\nr2 = x^2 + y^2;\nm2 = (x^2 - 3*y^2)^2;\ng = (x^2*m2 - r2)/20"; #define Twenty (20.0) Float aat_g_flt (Float x) { ROUND_NEAR; { Float yc = 27.0/16.0; /* Should be exact */ Float y = yc; Float x2 = x*x; Float y2 = y*y; Float r2 = x2 + y2; Float m = x2 - Three * y2; Float m2 = m*m; Float res = (x2*m2 - r2)/Twenty; return (res); } } Interval aat_g_ia (Interval x) { ROUND_NEAR; { Float yc = 27.0/16.0; /* Should be exact */ Interval y = {yc, yc}; Interval x2 = ia_sqr(x); Interval y2 = ia_sqr(y); Interval r2 = ia_add(x2, y2); Interval m = ia_sub(x2, ia_scale(y2, Three, One)); Interval m2 = ia_sqr(m); Interval res = ia_scale(ia_sub(ia_mul(x2, m2), r2), One, Twenty); return (res); } } AAP aat_g_aa (AAP x) { MemP frame = aa_top(); ROUND_NEAR; { Float yc = 27.0/16.0; /* Should be exact */ AAP y = aa_const(yc, Zero); AAP x2 = aa_sqr(x); AAP y2 = aa_sqr(y); AAP r2 = aa_add(x2, y2); AAP m = aa_sub(x2, aa_scale(y2, Three, One)); AAP m2 = aa_sqr(m); AAP res = aa_scale(aa_sub(aa_mul(x2, m2), r2), One, Twenty); return (aa_return(frame, res)); } } Interval aat_gxd = {-6.0, 6.0}; Interval aat_gyd = {-6.0, 6.0}; int aat_gn = 64;