/****************************************************************************/ /* (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_ftag = "f2"; char *aat_fname = "r2 = x^2 + y^2;\nxy = x*y;\nfa = (r^2 + xy - 1/4)^3;\nfb = (r^2 - xy - 1/4)^3;\nf = fa + fb - fa*fb"; Float aat_f_flt (Float x, Float y) { ROUND_NEAR; { Float ha = x*x + y*y + x*y - Quarter; Float fa = ha*ha*ha; Float hb = x*x + y*y - x*y - Quarter; Float fb = hb*hb*hb; Float res = (fa + fb - fa*fb); return (res); } } Interval aat_f_ia (Interval x, Interval y) { Interval x2 = ia_sqr(x); Interval y2 = ia_sqr(y); Interval r2 = ia_add(x2, y2); Interval xy = ia_mul(x, y); Interval ha = ia_shift(ia_add(r2, xy), -Quarter); Interval fa = ia_mul(ia_sqr(ha), ha); Interval hb = ia_shift(ia_sub(r2, xy), -Quarter); Interval fb = ia_mul(ia_sqr(hb), hb); Interval fafb = ia_mul(fa, fb); Interval res = ia_sub (ia_add(fa, fb), fafb); return (res); } AAP aat_f_aa (AAP x, AAP y) { MemP frame = aa_top(); AAP x2 = aa_sqr(x); AAP y2 = aa_sqr(y); AAP r2 = aa_add(x2, y2); AAP xy = aa_mul(x, y); AAP ha = aa_shift(aa_add(r2, xy), -Quarter); AAP fa = aa_mul(aa_sqr(ha), ha); AAP hb = aa_shift(aa_sub(r2, xy), -Quarter); AAP fb = aa_mul(aa_sqr(hb), hb); AAP fafb = aa_mul(fa, fb); AAP res = aa_sub (aa_add(fa, fb), fafb); return (aa_return(frame, res)); } Interval aat_fxd = {-One, One}; Interval aat_fyd = {-One, One}; int aat_fn = 32;