/****************************************************************************/ /* (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 = "fiamany"; char *aat_fname = "f = x^2 + y^2 + x*y - (x*y)^2/2 - 1/4"; Float aat_f_flt (Float x, Float y) { ROUND_NEAR; return (x*x + y*y + x*y - (x*y)*(x*y)*Half - Quarter); } Interval aat_f_ia (Interval x, Interval y) { Interval x2 = ia_sqr(x); Interval y2 = ia_sqr(y); Interval xy = ia_mul(x, y); Interval x2y2d2 = ia_scale(ia_sqr(xy), One, Two); Interval sum = ia_add(ia_add(ia_add(x2, y2), xy), ia_neg(x2y2d2)); Interval res = ia_shift(sum, -Quarter); 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 xy = aa_mul(x, y); AAP x2y2d2 = aa_scale(aa_sqr(xy), One, Two); AAP sum = aa_add(aa_add(aa_add(x2, y2), xy), aa_neg(x2y2d2)); AAP res = aa_shift(sum, -Quarter); return (aa_return(frame, res)); } Interval aat_fxd = {-Two, Two}; Interval aat_fyd = {-Two, Two}; int aat_fn = 32;