note description: "[ Basic mathematical operations, single-precision. This class may be used as ancestor by classes needing its facilities ]" legal: "See notice at end of class." status: "See notice at end of class." date: "$Date$" revision: "$Revision$" class SINGLE_MATH inherit MATH_CONST feature -- Access log_2 (v: REAL): REAL -- Base 2 logarithm of `v' require v > 0.0 do Result := log (v) / log (2.0) end cosine (v: REAL): REAL -- Trigonometric cosine of radian `v' approximated -- in the range [-pi/4, +pi/4] external "C signature (double): double use " alias "cos" end arc_cosine (v: REAL): REAL -- Trigonometric arccosine of `v' external "C signature (double): double use " alias "acos" end sine (v: REAL): REAL -- Trigonometric sine of radian `v' approximated -- in range [-pi/4, +pi/4] external "C signature (double): double use " alias "sin" end arc_sine (v: REAL): REAL -- Trigonometric arcsine of `v' external "C signature (double): double use " alias "asin" end tangent (v: REAL): REAL -- Trigonometric tangent of radian `v' approximated -- in range [-pi/4, +pi/4] external "C signature (double): double use " alias "tan" end arc_tangent (v: REAL): REAL -- Trigonometric arctangent of `v' external "C signature (double): double use " alias "atan" end sqrt (v: REAL): REAL -- Square root of `v' require v >= 0.0 external "C signature (double): double use " alias "sqrt" end log (v: REAL): REAL -- Natural logarithm of `v' require v > 0.0 external "C signature (double): double use " alias "log" end log10 (v: REAL): REAL -- Base 10 logarithm of `v' require v > 0.0 external "C signature (double): double use " alias "log10" end floor (v: REAL): REAL -- Greatest integral value less than or equal to `v' external "C signature (double): double use " alias "floor" end ceiling (v: REAL): REAL -- Least integral value greater than or equal to `v' external "C signature (double): double use " alias "ceil" end feature {NONE} -- Implementation rabs (v: REAL): REAL -- Absolute value of `v' external "C signature (double): double use " alias "fabs" end note library: "EiffelBase: Library of reusable components for Eiffel." copyright: "Copyright (c) 1984-2006, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 356 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class SINGLE_MATH