% function [ fl_root, root ] = QuadRoot( a, b, c )
% 
% Purpose: compute the largest root of a x^2 + b x + c 
%
% Input:  a, b, c -- coefficients of the quadratic polynomial
% 
% Output: 
%         fl_root -- root as computed using the floating point number system
%                    defined by global variables fp_t, fp_U, fp_L, and fp_method
%                    (see fl.m or type 'help fl')
%
%         root --    root as computed by MATLAB using regular precision used by MATLAB
%                    

function [ fl_root, root ] = QuadRoot( a, b, c )

discr = b^2 - 4 * a * c;

root =  ( -b + sqrt( discr ) )/( 2 * a );

discr = fl ( fl( fl( b )^2 ) - fl( 4 * fl( fl( a )* fl( c ) ) ) );

fl_root =  fl( fl( - fl( b ) + fl( sqrt( fl( discr ) ) ) )/ fl ( 2 * fl( a  ) ) );



