/****************************************************************************/ /* (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 = "gbadia"; char *aat_gname = "g(x) = sqrt(x^2 - x + 1/2)/sqrt(x^2 + 1/2)"; Float aat_g_flt (Float x) { ROUND_NEAR; return (sqrt(x*x - x + 0.50)/sqrt(x*x + 0.50)); } Interval aat_g_ia (Interval x) { Interval x2 = ia_sqr(x); Interval hlf = {Half, Half}; Interval dif = ia_sub(x2, x); Interval sum1 = ia_add(dif, hlf); Interval sum2 = ia_add(x2, hlf); Interval res = ia_div(ia_sqrt(sum1), ia_sqrt(sum2)); return (res); } AAP aat_g_aa (AAP x) { MemP frame = aa_top(); AAP x2 = aa_sqr(x); AAP hlf = aa_const(Half, Zero); AAP dif = aa_sub(x2, x); AAP sum1 = aa_add(dif, hlf); AAP sum2 = aa_add(x2, hlf); AAP res = aa_div(aa_sqrt(sum1), aa_sqrt(sum2)); return (aa_return(frame, res)); } Interval aat_gxd = {-Two, Two}; Interval aat_gyd = {-Half*Quarter, Two}; int aat_gn = 16;