Skip to content

Commit

Permalink
Allow C and Java native text spellings of NaN and infinities
Browse files Browse the repository at this point in the history
C's printf doesn't output mixed case, while Java's Double.valueOf and
Double.toString parse/output only `Infinity`, not `Inf`. Rather than
requiring special-case code for both input and output in both languages,
relax the VCF specification to allow NAN/INF/INFINITY case-insensitively.

(Add "IEEE-754" to be specific and to improve the line breaks.)
  • Loading branch information
jmarshall committed May 14, 2019
1 parent d962e2f commit 9f1a158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VCFv4.3.tex
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ \subsection{Character encoding, non-printable characters and characters with spe


\subsection{Data types}
Data types supported by VCF are: Integer (32-bit, signed), Float (32-bit, formatted to match the regular expression \verb|^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$|, \texttt{NaN}, or \texttt{+/-Inf}), Flag, Character, and String.
Data types supported by VCF are: Integer (32-bit, signed), Float (32-bit IEEE-754, formatted to match one of the regular expressions \verb|^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$| or \verb"^[-+]?(INF|INFINITY|NAN)$" case insensitively), Flag, Character, and String.
For the Integer type, the values from $-2^{31}$ to $-2^{31}+7$ cannot be stored in the binary version and therefore are disallowed in both VCF and BCF, see \ref{BcfTypeEncoding}.

\subsection{Meta-information lines}
Expand Down

0 comments on commit 9f1a158

Please sign in to comment.