/****************************************************************************/ /* (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 = "g10"; char *aat_gname = "g(x) = 1/sqrt(x^2 + 1/2)"; Float aat_g_flt (Float x) { ROUND_NEAR; return (One/sqrt(x*x + Half)); } Interval aat_g_ia (Interval x) { Interval x2 = ia_sqr(x); Interval hlf = (Interval){Half, Half}; Interval sum = ia_add(x2, hlf); Interval res = ia_inv(ia_sqrt(sum)); return (res); } AAP aat_g_aa (AAP x) { MemP frame = aa_top(); AAP x2 = aa_sqr(x); AAP hlf = aa_const(Half, Zero); AAP sum = aa_add(x2, hlf); AAP res = aa_inv(aa_sqrt(sum)); return (aa_return(frame, res)); } Interval aat_gxd = {-Three, Three}; Interval aat_gyd = {-Three, Three}; int aat_gn = 32;