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

Contents of /FreeELKS/trunk/library/kernel/double.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: 2501 byte(s)
Replaced external "C" features by built-in features.

1 indexing
2 description: "Real values, double 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 DOUBLE inherit
10
11 DOUBLE_REF
12 redefine
13 infix "<",
14 truncated_to_integer,
15 truncated_to_integer_64,
16 truncated_to_real,
17 ceiling_real_64,
18 floor_real_64,
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 ({DOUBLE_REF}),
35 to_reference: {DOUBLE_REF, NUMERIC, COMPARABLE, PART_COMPARABLE, HASHABLE, ANY},
36 truncated_to_real: {REAL}
37
38 feature -- Comparison
39
40 infix "<" (other: like Current): BOOLEAN is
41 -- Is `other' greater than current double?
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 truncated_to_real: REAL is
63 -- Real part (Same sign, largest absolute
64 -- value no greater than current object's)
65 external
66 "built_in"
67 end
68
69 ceiling_real_64: DOUBLE is
70 -- Smallest integral value no smaller than current object
71 external
72 "built_in"
73 end
74
75 floor_real_64: DOUBLE is
76 -- Greatest integral value no greater than current object
77 external
78 "built_in"
79 end
80
81 feature -- Basic operations
82
83 infix "+" (other: like Current): like Current is
84 -- Sum with `other'
85 external
86 "built_in"
87 end
88
89 infix "-" (other: like Current): like Current is
90 -- Result of subtracting `other'
91 external
92 "built_in"
93 end
94
95 infix "*" (other: like Current): like Current is
96 -- Product with `other'
97 external
98 "built_in"
99 end
100
101 infix "/" (other: like Current): like Current is
102 -- Division by `other'
103 external
104 "built_in"
105 end
106
107 infix "^" (other: DOUBLE): DOUBLE is
108 -- Current double to the power `other'
109 external
110 "built_in"
111 end
112
113 prefix "+": like Current is
114 -- Unary plus
115 external
116 "built_in"
117 end
118
119 prefix "-": like Current is
120 -- Unary minus
121 external
122 "built_in"
123 end
124
125 feature -- Output
126
127 out: STRING is
128 -- Printable representation of double value
129 external
130 "built_in"
131 end
132
133 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23