/[eiffelstudio]/FreeELKS/trunk/library/kernel/real.e
ViewVC logotype

Contents of /FreeELKS/trunk/library/kernel/real.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91458 - (show annotations)
Thu Feb 9 11:23:11 2006 UTC (13 years, 11 months ago) by ericb
File size: 2401 byte(s)
Replaced external "C" features by built-in features.

1 indexing
2 description: "Real values, single precision"
3 library: "Free implementation of ELKS library"
4 copyright: "Copyright (c) 1986-2006, Eiffel Software and others"
5 license: "Eiffel Forum License v2 (see forum.txt)"
6 date: "$Date$"
7 revision: "$Revision$"
8
9 expanded class REAL inherit
10
11 REAL_REF
12 redefine
13 infix "<",
14 truncated_to_integer,
15 truncated_to_integer_64,
16 to_double,
17 ceiling_real_32,
18 floor_real_32,
19 infix "+",
20 infix "-",
21 infix "*",
22 infix "/",
23 infix "^",
24 prefix "-",
25 prefix "+",
26 out
27 end
28
29 create
30 default_create,
31 make_from_reference
32
33 convert
34 make_from_reference ({REAL_REF}),
35 to_reference: {REAL_REF, NUMERIC, COMPARABLE, PART_COMPARABLE, HASHABLE, ANY},
36 to_double: {DOUBLE}
37
38 feature -- Comparison
39
40 infix "<" (other: like Current): BOOLEAN is
41 -- Is `other' greater than current real?
42 external
43 "built_in"
44 end
45
46 feature -- Conversion
47
48 truncated_to_integer: INTEGER is
49 -- Integer part (same sign, largest absolute
50 -- value no greater than current object's)
51 external
52 "built_in"
53 end
54
55 truncated_to_integer_64: INTEGER_64 is
56 -- Integer part (same sign, largest absolute
57 -- value no greater than current object's)
58 external
59 "built_in"
60 end
61
62 to_double: DOUBLE is
63 -- Current seen as a double
64 external
65 "built_in"
66 end
67
68 ceiling_real_32: REAL is
69 -- Smallest integral value no smaller than current object
70 external
71 "built_in"
72 end
73
74 floor_real_32: REAL is
75 -- Greatest integral value no greater than current object
76 external
77 "built_in"
78 end
79
80 feature -- Basic operations
81
82 infix "+" (other: like Current): like Current is
83 -- Sum with `other'
84 external
85 "built_in"
86 end
87
88 infix "-" (other: like Current): like Current is
89 -- Result of subtracting `other'
90 external
91 "built_in"
92 end
93
94 infix "*" (other: like Current): like Current is
95 -- Product by `other'
96 external
97 "built_in"
98 end
99
100 infix "/" (other: like Current): like Current is
101 -- Division by `other'
102 external
103 "built_in"
104 end
105
106 infix "^" (other: DOUBLE): DOUBLE is
107 -- Current real to the power `other'
108 external
109 "built_in"
110 end
111
112 prefix "+": like Current is
113 -- Unary plus
114 external
115 "built_in"
116 end
117
118 prefix "-": like Current is
119 -- Unary minus
120 external
121 "built_in"
122 end
123
124 feature -- Output
125
126 out: STRING is
127 -- Printable representation of real value
128 external
129 "built_in"
130 end
131
132 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23