TeX will interpret a string of digits (with optional sign and optional decimal point or comma) as a decimal number only if it has to, that is
when it is looking for an explicit dimension, in which case the string representing a decimal number must be followed by one of the allowed units.
It's quite unfortunate that the documentation of fp
presents the syntax in the shown form, because it might suggest resemblance to other programming languages that are more forgiving when numbers are involved.
Since TeX is mainly a typesetting program, it doesn't scan numbers except when it has to, but this can only happen when primitive commands are used, not with defined macros such as \FParcsin
.
The suggestion \FParcsin#1#2
means that #1
and #2
are standard arguments that therefore should be braced (unless they consist of a single token). So
\FParcsin{\arcsinhalf}{0.5}
is the correct syntax. This can be abbreviated into \FParcsin\arcsinhalf{0.5}
because the first argument is a single token.
You could safely type \FParcsin\arcsinone1
, but it's better to stick to a standard and type \FParcsin\arcsinone{1}
, so the arguments are also visually clearer.
Similarly, you should stick to
\FPdiv\pidivsix{\FPpi}{6}
for the same reasons. The code \FPdiv\pidivsix \FPpi 6
works, but if you try to compute pi over 10,
\FPdiv\pidivten \FPpi 10
would definitely not work and should be
\FPdiv\pidivten {\FPpi} {10}
or
\FPdiv\pidivten{\FPpi}{10}
Spaces are ignored when looking for an argument, so you have some freedom to suit your preferences.
\frac{1}{2}
is not interpreted as a number, but as a string. A TeX specialist can explain this better than I can.\FParcsin \arcsinhalf{0.5}
. Otherwise your input is\FParcsin \arcsinhalf{0}
and you are typesetting.5
\FParcsin \arcsinhalf 0.5 \\
with\FParcsin \arcsinhalf {0.5}
. Apparentlyfp
grabs the numbers like normal arguments. If you omit the braces, you only get0
. You can already see that something fishy is going on on the input stage from the fact that the document typesets a spurious '.5'.