blob: fb419d07061e093bdcf6881dbcf15deba093832f (
plain)
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
|
%D \module
%D [ file=cldf-pos,
%D version=2023.04.21,
%D title=\CONTEXT\ Data Macros,
%D subtitle=Posit,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{ConTeXt Posit Numbers / Initialization}
\registerctxluafile{cldf-pos}{autosuffix}
\newposit\pfpi \pfpi 3.1415926535897932384626433832795028841971
\newposit\pftwopi \pftwopi \floatexpr \pfpi * 2 \relax
% \newfloat\fooA
%
% \scratchdimen=123.456pt\relax [\type{dim:} \the\scratchdimen==123.456pt]\par
% \fooA =123.456\relax [\type{pos:} \the\fooA ==123.456] \par
% \fooA =\scratchdimen\relax [\type{pos:} \the\fooA ==123.456] \par
% \scratchdimen=\fooA\relax [\type{dim:} \the\scratchdimen==123.456pt]\par
% \scratchdimen\dimexpr\fooA+10pt\relax[\type{dim:} \the\scratchdimen==133.456pt]\par
%
% \fooA\pfsin \pfpi [\the\fooA]\par
% \fooA\pfcos \pfpi [\the\fooA]\par
% \fooA\pfsqrt\pfpi [\the\fooA]\par
% \fooA\pfexp \pfpi [\the\fooA]\par
% \fooA\pflog \pfpi [\the\fooA]\par
% \fooA\pfpow \pfpi 2 [\the\fooA]\par
\endinput
|