about summary refs log tree commit diff
path: root/doc/manual/expressions/language-values.xml
diff options
context:
space:
mode:
authorChristian Theune <ct@flyingcircus.io>2016-01-06T07·41+0100
committerChristian Theune <ct@flyingcircus.io>2016-01-06T07·41+0100
commitb4bda4765af09acb86a4dd71105059491e7dcc30 (patch)
tree813e1cc07afc308fd37cfcb8222901e04ef293ca /doc/manual/expressions/language-values.xml
parent934642155c036ce6880e57854f095f2863ab80f1 (diff)
Update documentation for floats.
Diffstat (limited to 'doc/manual/expressions/language-values.xml')
-rw-r--r--doc/manual/expressions/language-values.xml9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/manual/expressions/language-values.xml b/doc/manual/expressions/language-values.xml
index 0bf6632d6e3a..f1174ecb5d8d 100644
--- a/doc/manual/expressions/language-values.xml
+++ b/doc/manual/expressions/language-values.xml
@@ -140,8 +140,13 @@ stdenv.mkDerivation {
 
   </listitem>
 
-  <listitem><para><emphasis>Integers</emphasis>, e.g.,
-  <literal>123</literal>.</para></listitem>
+  <listitem><para>Numbers, which can be <emphasis>integers</emphasis> (like
+  <literal>123</literal>) or <emphasis>floating point</emphasis> (like
+  <literal>123.43</literal> or <literal>.27e13</literal>).</para>
+
+  <para>Numbers are type-compatible: pure integer operations will always
+  return integers, whereas any operation involving at least one floating point
+  number will have a floating point number as a result.</para></listitem>
 
   <listitem><para><emphasis>Paths</emphasis>, e.g.,
   <filename>/bin/sh</filename> or <filename>./builder.sh</filename>.