Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Numbers/standard_floating_numbers.adb, Revision 1.1
1.1 ! maekawa 1: package body standard_floating_numbers is
! 2:
! 3: function Create ( n : natural ) return single_float is
! 4: begin
! 5: return single_float(n);
! 6: end Create;
! 7:
! 8: function Create ( n : natural ) return double_float is
! 9: begin
! 10: return double_float(n);
! 11: end Create;
! 12:
! 13: function Equal ( a,b : single_float ) return boolean is
! 14: begin
! 15: return (a = b);
! 16: end equal;
! 17:
! 18: function Equal ( a,b : double_float ) return boolean is
! 19: begin
! 20: return (a = b);
! 21: end Equal;
! 22:
! 23: function AbsVal ( a : single_float ) return single_float is
! 24: begin
! 25: return ABS(a);
! 26: end AbsVal;
! 27:
! 28: function AbsVal ( a : double_float ) return double_float is
! 29: begin
! 30: return ABS(a);
! 31: end AbsVal;
! 32:
! 33: procedure Copy ( a : in single_float; b : in out single_float ) is
! 34: begin
! 35: b := a;
! 36: end Copy;
! 37:
! 38: procedure Copy ( a : in double_float; b : in out double_float ) is
! 39: begin
! 40: b := a;
! 41: end Copy;
! 42:
! 43: procedure Add ( a : in out single_float; b : in single_float ) is
! 44: begin
! 45: a := a + b;
! 46: end Add;
! 47:
! 48: procedure Add ( a : in out double_float; b : in double_float ) is
! 49: begin
! 50: a := a + b;
! 51: end Add;
! 52:
! 53: procedure Sub ( a : in out single_float; b : in single_float ) is
! 54: begin
! 55: a := a - b;
! 56: end Sub;
! 57:
! 58: procedure Sub ( a : in out double_float; b : in double_float ) is
! 59: begin
! 60: a := a - b;
! 61: end Sub;
! 62:
! 63: procedure Min ( a : in out single_float ) is
! 64: begin
! 65: a := -a;
! 66: end Min;
! 67:
! 68: procedure Min ( a : in out double_float ) is
! 69: begin
! 70: a := -a;
! 71: end Min;
! 72:
! 73: procedure Mul ( a : in out single_float; b : in single_float ) is
! 74: begin
! 75: a := a*b;
! 76: end Mul;
! 77:
! 78: procedure Mul ( a : in out double_float; b : in double_float ) is
! 79: begin
! 80: a := a*b;
! 81: end Mul;
! 82:
! 83: procedure Div ( a : in out single_float; b : in single_float ) is
! 84: begin
! 85: a := a/b;
! 86: end Div;
! 87:
! 88: procedure Div ( a : in out double_float; b : in double_float ) is
! 89: begin
! 90: a := a/b;
! 91: end Div;
! 92:
! 93: procedure Clear ( a : in out single_float ) is
! 94: begin
! 95: null;
! 96: end Clear;
! 97:
! 98: procedure Clear ( a : in out double_float ) is
! 99: begin
! 100: null;
! 101: end Clear;
! 102:
! 103: end Standard_Floating_Numbers;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>