-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathdouble.xml
More file actions
58 lines (39 loc) · 1.58 KB
/
double.xml
File metadata and controls
58 lines (39 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>double</name>
<category>Data</category>
<subcategory>Primitive</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
double a; // Declare variable 'a' of type double
a = 1.5387D; // Assign 'a' the value 1.5387
double b = -2.984D; // Declare variable 'b' and assign it the value -2.984
double c = a + b; // Declare variable 'c' and assign it the sum of 'a' and 'b'
float f = (float)c; // Converts the value of 'c' from a double to a float
]]></code>
</example>
<description><![CDATA[
Datatype for floating-point numbers larger than those that can be stored in a <b>float</b>. A <b>float</b> is a 32-bit values that can be as large as 3.40282347E+38 and as low as -3.40282347E+38. A <b>double</b> can be used similarly to a float, but can have a greater magnitude because it's a 64-bit number. Processing functions don't use this datatype, so while they work in the language, you'll usually have to convert to a <b>float</b> using the <b>(float)</b> syntax before passing into a function.]]></description>
<syntax>
double <c>var</c>
double <c>var</c> = <c>value</c>
</syntax>
<parameter>
<label>var</label>
<description><![CDATA[variable name referencing the float]]></description>
</parameter>
<parameter>
<label>value</label>
<description><![CDATA[any floating-point value]]></description>
</parameter>
<returns></returns>
<related>
float
</related>
<availability>1.0</availability>
<type>Datatype</type>
<partof>PDE</partof>
<level>Extended</level>
</root>