Changeset 8bc4ef8 for doc/user/user.tex
 Timestamp:
 Apr 28, 2016, 2:48:14 PM (6 years ago)
 Branches:
 aaronthesis, armeh, cleanupdtors, ctor, deferred_resn, demangler, enum, forallpointerdecay, gc_noraii, jacob/cs343translation, jenkinssandbox, master, memory, newast, newastuniqueexpr, newenv, no_list, persistentindexer, pthreademulation, qualifiedEnum, resolvnew, with_gc
 Children:
 e945826
 Parents:
 b72bad4f
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

doc/user/user.tex
rb72bad4f r8bc4ef8 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Wed Apr 27 22:39:40201614 %% Update Count : 1 6013 %% Last Modified On : Thu Apr 28 14:45:07 2016 14 %% Update Count : 181 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 233 233 cfa [ gccoptions ] C/@{\CFA}@files [ assembler/loaderfiles ] 234 234 \end{lstlisting} 235 \index {cfa@\lstinline$cfa$}\index{compilation!cfa@\lstinline$cfa$}235 \indexc{cfa}\index{compilation!cfa@\lstinline$cfa$} 236 236 By default, \CFA programs having the following \lstinline@gcc@ flags turned on: 237 237 \begin{description} 238 238 \item 239 239 \hspace*{4pt}\lstinline@std=gnu99@ 240 \index {std=gnu99@{\lstinline$std=gnu99$}}\index{compilation option!std=gnu99@{\lstinline$std=gnu99$}}240 \indexc{std=gnu99}\index{compilation option!std=gnu99@{\lstinline$std=gnu99$}} 241 241 The 1999 C standard plus GNU extensions. 242 242 \item 243 243 \hspace*{4pt}\lstinline@fgnu89inline@ 244 \index {fgnu89inline@{\lstinline$fgnu89inline$}}\index{compilation option!fgnu89inline@{\lstinline$fgnu89inline$}}244 \indexc{fgnu89inline}\index{compilation option!fgnu89inline@{\lstinline$fgnu89inline$}} 245 245 Use the traditional GNU semantics for inline routines in C99 mode. 246 246 \end{description} … … 249 249 \item 250 250 \hspace*{4pt}\lstinline@CFA@ 251 \index {CFA@{\lstinline$CFA$}}\index{compilation option!CFA@{\lstinline$CFA$}}251 \indexc{CFA}\index{compilation option!CFA@{\lstinline$CFA$}} 252 252 Only the C preprocessor and the \CFA translator steps are performed and the transformed program is written to standard output, which makes it possible to examine the code generated by the \CFA translator. 253 253 \end{description} … … 257 257 \item 258 258 \hspace*{4pt}\lstinline$__CFA__$ 259 \index {__CFA__@{\lstinline$__CFA__$}}\index{preprocessor variables!__CFA__@{\lstinline$__CFA__$}}259 \indexc{__CFA__}\index{preprocessor variables!__CFA__@{\lstinline$__CFA__$}} 260 260 is always available during preprocessing and its value is the current major \Index{version number} of \CFA.\footnote{ 261 261 The C preprocessor allows only integer values in a preprocessor variable so a value like ``\Version'' is not allowed. … … 264 264 \item 265 265 \hspace*{4pt}\lstinline$__CFA_MINOR__$ 266 \index {__CFA_MINOR__@{\lstinline$__CFA_MINOR__$}}\index{preprocessor variables!__CFA_MINOR__@{\lstinline$__CFA_MINOR__$}}266 \indexc{__CFA_MINOR__}\index{preprocessor variables!__CFA_MINOR__@{\lstinline$__CFA_MINOR__$}} 267 267 is always available during preprocessing and its value is the current minor \Index{version number} of \CFA. 268 268 269 269 \item 270 270 \hspace*{4pt}\lstinline$__CFA_PATCH__$ 271 \index {__CFA_PATCH__@\lstinline$__CFA_PATCH__$)}\index{preprocessor variables!__CFA_PATCH__@\lstinline$__CFA_PATCH__$}271 \indexc{__CFA_PATCH__}\index{preprocessor variables!__CFA_PATCH__@\lstinline$__CFA_PATCH__$} 272 272 is always available during preprocessing and its value is the current patch \Index{version number} of \CFA. 273 273 274 274 \item 275 275 \hspace*{4pt}\lstinline$__CFORALL__$ 276 \index {__CFORALL__@\lstinline$__CFORALL__$}\index{preprocessor variables!__CFORALL__@\lstinline$__CFORALL__$}276 \indexc{__CFORALL__}\index{preprocessor variables!__CFORALL__@\lstinline$__CFORALL__$} 277 277 is always available during preprocessing and it has no value. 278 278 \end{description} … … 505 505 in both cases the type is assumed to be void as opposed to old style C defaults of int return type and unknown parameter types, respectively, as in: 506 506 \begin{lstlisting} 507 [@\,@] g( @\,@);// no input or output parameters507 [@\,@] g(); // no input or output parameters 508 508 [ void ] g( void ); // no input or output parameters 509 509 \end{lstlisting} … … 4193 4193 \begin{lstlisting}[belowskip=0pt] 4194 4194 sout  1  ", x"  2  ". x"  3  ": x"  4  "; x"  5  "! x"  6  "? x"  7  ") x"  8  "] x"  9  "} x" 4195  10  "% x"  11  L"¢ x"  12  L"» x"  endl;4195  10  "% x"  11  "¢ x"  12  "» x"  endl; 4196 4196 \end{lstlisting} 4197 4197 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4262 4262 sout  "x ("  1  "x ["  2  "x {"  3  "x $"  4  "x £"  5  "x ¥"  6  "x ¿"  7  "x «"  8  endl; 4263 4263 sout  1  ", x"  2  ". x"  3  ": x"  4  "; x"  5  "! x"  6  "? x"  7  ") x"  8  "] x"  9  "} x" 4264  10  "% x"  11  L"¢ x"  12  L"» x"  endl;4264  10  "% x"  11  "¢ x"  12  "» x"  endl; 4265 4265 sout  "x`"  1  "`x'"  2  "'x\""  3  "\"x"  "x "  4  " x"  endl; 4266 4266 sout  "x\t"  1  "\tx"  endl; … … 4290 4290 \subsection{malloc} 4291 4291 4292 \begin{lstlisting} 4293 forall( otype T ) T * malloc( void ); 4292 \begin{lstlisting}[escapechar=^] 4293 forall( otype T ) T * malloc( void );^\indexc{malloc}^ 4294 4294 forall( otype T ) T * malloc( char fill ); 4295 4295 forall( otype T ) T * malloc( T * ptr, size_t size ); 4296 4296 forall( otype T ) T * malloc( T * ptr, size_t size, unsigned char fill ); 4297 forall( otype T ) T * calloc( size_t nmemb ); 4298 forall( otype T ) T * realloc( T * ptr, size_t size ); 4297 forall( otype T ) T * calloc( size_t nmemb );^\indexc{calloc}^ 4298 forall( otype T ) T * realloc( T * ptr, size_t size );^\indexc{ato}^ 4299 4299 forall( otype T ) T * realloc( T * ptr, size_t size, unsigned char fill ); 4300 4300 4301 forall( otype T ) T * aligned_alloc( size_t alignment ); 4301 forall( otype T ) T * aligned_alloc( size_t alignment );^\indexc{ato}^ 4302 4302 forall( otype T ) T * memalign( size_t alignment ); // deprecated 4303 4303 forall( otype T ) int posix_memalign( T ** ptr, size_t alignment ); … … 4310 4310 \subsection{ato / strto} 4311 4311 4312 \begin{lstlisting} 4313 int ato( const char * ptr ); 4312 \begin{lstlisting}[escapechar=^] 4313 int ato( const char * ptr );^\indexc{ato}^ 4314 4314 unsigned int ato( const char * ptr ); 4315 4315 long int ato( const char * ptr ); … … 4341 4341 \subsection{bsearch / qsort} 4342 4342 4343 \begin{lstlisting} 4343 \begin{lstlisting}[escapechar=^] 4344 4344 forall( otype T  { int ?<?( T, T ); } ) 4345 T * bsearch( const T key, const T * arr, size_t dimension ); 4345 T * bsearch( const T key, const T * arr, size_t dimension );^\indexc{bsearch}^ 4346 4346 4347 4347 forall( otype T  { int ?<?( T, T ); } ) 4348 void qsort( const T * arr, size_t dimension ); 4348 void qsort( const T * arr, size_t dimension );^\indexc{qsort}^ 4349 4349 \end{lstlisting} 4350 4350 … … 4352 4352 \subsection{abs} 4353 4353 4354 \begin{lstlisting} 4355 char abs( char ); 4354 \begin{lstlisting}[escapechar=^] 4355 char abs( char );^\indexc{abs}^ 4356 4356 int abs( int ); 4357 4357 long int abs( long int ); … … 4368 4368 \subsection{random} 4369 4369 4370 \begin{lstlisting} 4371 void rand48seed( long int s ); 4372 char rand48(); 4370 \begin{lstlisting}[escapechar=^] 4371 void rand48seed( long int s );^\indexc{rand48seed}^ 4372 char rand48();^\indexc{rand48}^ 4373 4373 int rand48(); 4374 4374 unsigned int rand48(); … … 4385 4385 \subsection{min / max / swap} 4386 4386 4387 \begin{lstlisting} 4387 \begin{lstlisting}[escapechar=^] 4388 4388 forall( otype T  { int ?<?( T, T ); } ) 4389 T min( const T t1, const T t2 ); 4389 T min( const T t1, const T t2 );^\indexc{min}^ 4390 4390 4391 4391 forall( otype T  { int ?>?( T, T ); } ) 4392 T max( const T t1, const T t2 ); 4392 T max( const T t1, const T t2 );^\indexc{max}^ 4393 4393 4394 4394 forall( otype T ) 4395 void swap( T * t1, T * t2 ); 4395 void swap( T * t1, T * t2 );^\indexc{swap}^ 4396 4396 \end{lstlisting} 4397 4397 … … 4405 4405 \subsection{General} 4406 4406 4407 \begin{lstlisting} 4408 float fabs( float ); 4407 \begin{lstlisting}[escapechar=^] 4408 float fabs( float );^\indexc{fabs}^ 4409 4409 double fabs( double ); 4410 4410 long double fabs( long double ); … … 4413 4413 long double cabs( long double _Complex ); 4414 4414 4415 float ?%?( float, float ); 4415 float ?%?( float, float );^\indexc{fmod}^ 4416 4416 float fmod( float, float ); 4417 4417 double ?%?( double, double ); … … 4420 4420 long double fmod( long double, long double ); 4421 4421 4422 float remainder( float, float ); 4422 float remainder( float, float );^\indexc{remainder}^ 4423 4423 double remainder( double, double ); 4424 4424 long double remainder( long double, long double ); 4425 4425 4426 [ int, float ] remquo( float, float ); 4426 [ int, float ] remquo( float, float );^\indexc{remquo}^ 4427 4427 float remquo( float, float, int * ); 4428 4428 [ int, double ] remquo( double, double ); … … 4432 4432 4433 4433 [ int, float ] div( float, float ); // alternative name for remquo 4434 float div( float, float, int * ); 4434 float div( float, float, int * );^\indexc{div}^ 4435 4435 [ int, double ] div( double, double ); 4436 4436 double div( double, double, int * ); … … 4438 4438 long double div( long double, long double, int * ); 4439 4439 4440 float fma( float, float, float ); 4440 float fma( float, float, float );^\indexc{fma}^ 4441 4441 double fma( double, double, double ); 4442 4442 long double fma( long double, long double, long double ); 4443 4443 4444 float fdim( float, float ); 4444 float fdim( float, float );^\indexc{fdim}^ 4445 4445 double fdim( double, double ); 4446 4446 long double fdim( long double, long double ); 4447 4447 4448 float nan( const char * ); 4448 float nan( const char * );^\indexc{nan}^ 4449 4449 double nan( const char * ); 4450 4450 long double nan( const char * ); … … 4454 4454 \subsection{Exponential} 4455 4455 4456 \begin{lstlisting} 4457 float exp( float ); 4456 \begin{lstlisting}[escapechar=^] 4457 float exp( float );^\indexc{exp}^ 4458 4458 double exp( double ); 4459 4459 long double exp( long double ); … … 4462 4462 long double _Complex exp( long double _Complex ); 4463 4463 4464 float exp2( float ); 4464 float exp2( float );^\indexc{exp2}^ 4465 4465 double exp2( double ); 4466 4466 long double exp2( long double ); 4467 //float _Complex exp2( float _Complex );4468 //double _Complex exp2( double _Complex );4469 //long double _Complex exp2( long double _Complex );4470 4471 float expm1( float ); 4467 float _Complex exp2( float _Complex ); 4468 double _Complex exp2( double _Complex ); 4469 long double _Complex exp2( long double _Complex ); 4470 4471 float expm1( float );^\indexc{expm1}^ 4472 4472 double expm1( double ); 4473 4473 long double expm1( long double ); 4474 4474 4475 float log( float ); 4475 float log( float );^\indexc{log}^ 4476 4476 double log( double ); 4477 4477 long double log( long double ); … … 4480 4480 long double _Complex log( long double _Complex ); 4481 4481 4482 float log2( float ); 4482 float log2( float );^\indexc{log2}^ 4483 4483 double log2( double ); 4484 4484 long double log2( long double ); 4485 //float _Complex log2( float _Complex );4486 //double _Complex log2( double _Complex );4487 //long double _Complex log2( long double _Complex );4488 4489 float log10( float ); 4485 float _Complex log2( float _Complex ); 4486 double _Complex log2( double _Complex ); 4487 long double _Complex log2( long double _Complex ); 4488 4489 float log10( float );^\indexc{log10}^ 4490 4490 double log10( double ); 4491 4491 long double log10( long double ); 4492 //float _Complex log10( float _Complex );4493 //double _Complex log10( double _Complex );4494 //long double _Complex log10( long double _Complex );4495 4496 float log1p( float ); 4492 float _Complex log10( float _Complex ); 4493 double _Complex log10( double _Complex ); 4494 long double _Complex log10( long double _Complex ); 4495 4496 float log1p( float );^\indexc{log1p}^ 4497 4497 double log1p( double ); 4498 4498 long double log1p( long double ); 4499 4499 4500 int ilogb( float ); 4500 int ilogb( float );^\indexc{ilogb}^ 4501 4501 int ilogb( double ); 4502 4502 int ilogb( long double ); 4503 4503 4504 float logb( float ); 4504 float logb( float );^\indexc{logb}^ 4505 4505 double logb( double ); 4506 4506 long double logb( long double ); … … 4510 4510 \subsection{Power} 4511 4511 4512 \begin{lstlisting} 4513 float sqrt( float ); 4512 \begin{lstlisting}[escapechar=^] 4513 float sqrt( float );^\indexc{sqrt}^ 4514 4514 double sqrt( double ); 4515 4515 long double sqrt( long double ); … … 4518 4518 long double _Complex sqrt( long double _Complex ); 4519 4519 4520 float cbrt( float ); 4520 float cbrt( float );^\indexc{cbrt}^ 4521 4521 double cbrt( double ); 4522 4522 long double cbrt( long double ); 4523 4523 4524 float hypot( float, float ); 4524 float hypot( float, float );^\indexc{hypot}^ 4525 4525 double hypot( double, double ); 4526 4526 long double hypot( long double, long double ); 4527 4527 4528 float pow( float, float ); 4528 float pow( float, float );^\indexc{pow}^ 4529 4529 double pow( double, double ); 4530 4530 long double pow( long double, long double ); … … 4537 4537 \subsection{Trigonometric} 4538 4538 4539 \begin{lstlisting} 4540 float sin( float ); 4539 \begin{lstlisting}[escapechar=^] 4540 float sin( float );^\indexc{sin}^ 4541 4541 double sin( double ); 4542 4542 long double sin( long double ); … … 4545 4545 long double _Complex sin( long double _Complex ); 4546 4546 4547 float cos( float ); 4547 float cos( float );^\indexc{cos}^ 4548 4548 double cos( double ); 4549 4549 long double cos( long double ); … … 4552 4552 long double _Complex cos( long double _Complex ); 4553 4553 4554 float tan( float ); 4554 float tan( float );^\indexc{tan}^ 4555 4555 double tan( double ); 4556 4556 long double tan( long double ); … … 4559 4559 long double _Complex tan( long double _Complex ); 4560 4560 4561 float asin( float ); 4561 float asin( float );^\indexc{asin}^ 4562 4562 double asin( double ); 4563 4563 long double asin( long double ); … … 4566 4566 long double _Complex asin( long double _Complex ); 4567 4567 4568 float acos( float ); 4568 float acos( float );^\indexc{acos}^ 4569 4569 double acos( double ); 4570 4570 long double acos( long double ); … … 4573 4573 long double _Complex acos( long double _Complex ); 4574 4574 4575 float atan( float ); 4575 float atan( float );^\indexc{atan}^ 4576 4576 double atan( double ); 4577 4577 long double atan( long double ); … … 4580 4580 long double _Complex atan( long double _Complex ); 4581 4581 4582 float atan2( float, float ); 4582 float atan2( float, float );^\indexc{atan2}^ 4583 4583 double atan2( double, double ); 4584 4584 long double atan2( long double, long double ); 4585 4585 4586 4586 float atan( float, float ); // alternative name for atan2 4587 double atan( double, double ); 4587 double atan( double, double );^\indexc{atan}^ 4588 4588 long double atan( long double, long double ); 4589 4589 \end{lstlisting} … … 4592 4592 \subsection{Hyperbolic} 4593 4593 4594 \begin{lstlisting} 4595 float sinh( float ); 4594 \begin{lstlisting}[escapechar=^] 4595 float sinh( float );^\indexc{sinh}^ 4596 4596 double sinh( double ); 4597 4597 long double sinh( long double ); … … 4600 4600 long double _Complex sinh( long double _Complex ); 4601 4601 4602 float cosh( float ); 4602 float cosh( float );^\indexc{cosh}^ 4603 4603 double cosh( double ); 4604 4604 long double cosh( long double ); … … 4607 4607 long double _Complex cosh( long double _Complex ); 4608 4608 4609 float tanh( float ); 4609 float tanh( float );^\indexc{tanh}^ 4610 4610 double tanh( double ); 4611 4611 long double tanh( long double ); … … 4614 4614 long double _Complex tanh( long double _Complex ); 4615 4615 4616 float asinh( float ); 4616 float asinh( float );^\indexc{asinh}^ 4617 4617 double asinh( double ); 4618 4618 long double asinh( long double ); … … 4621 4621 long double _Complex asinh( long double _Complex ); 4622 4622 4623 float acosh( float ); 4623 float acosh( float );^\indexc{acosh}^ 4624 4624 double acosh( double ); 4625 4625 long double acosh( long double ); … … 4628 4628 long double _Complex acosh( long double _Complex ); 4629 4629 4630 float atanh( float ); 4630 float atanh( float );^\indexc{atanh}^ 4631 4631 double atanh( double ); 4632 4632 long double atanh( long double ); … … 4639 4639 \subsection{Error / Gamma} 4640 4640 4641 \begin{lstlisting} 4642 float erf( float ); 4641 \begin{lstlisting}[escapechar=^] 4642 float erf( float );^\indexc{erf}^ 4643 4643 double erf( double ); 4644 4644 long double erf( long double ); 4645 //float _Complex erf( float _Complex );4646 //double _Complex erf( double _Complex );4647 //long double _Complex erf( long double _Complex );4648 4649 float erfc( float ); 4645 float _Complex erf( float _Complex ); 4646 double _Complex erf( double _Complex ); 4647 long double _Complex erf( long double _Complex ); 4648 4649 float erfc( float );^\indexc{erfc}^ 4650 4650 double erfc( double ); 4651 4651 long double erfc( long double ); 4652 //float _Complex erfc( float _Complex );4653 //double _Complex erfc( double _Complex );4654 //long double _Complex erfc( long double _Complex );4655 4656 float lgamma( float ); 4652 float _Complex erfc( float _Complex ); 4653 double _Complex erfc( double _Complex ); 4654 long double _Complex erfc( long double _Complex ); 4655 4656 float lgamma( float );^\indexc{lgamma}^ 4657 4657 double lgamma( double ); 4658 4658 long double lgamma( long double ); … … 4661 4661 long double lgamma( long double, int * ); 4662 4662 4663 float tgamma( float ); 4663 float tgamma( float );^\indexc{tgamma}^ 4664 4664 double tgamma( double ); 4665 4665 long double tgamma( long double ); … … 4670 4670 4671 4671 \begin{lstlisting}[escapechar=^] 4672 float floor( float );^\index {floor@\lstinline$floor$}^4672 float floor( float );^\indexc{floor}^ 4673 4673 double floor( double ); 4674 4674 long double floor( long double ); 4675 4675 4676 float ceil( float );^\index {ceil@\lstinline$ceil$}^4676 float ceil( float );^\indexc{ceil}^ 4677 4677 double ceil( double ); 4678 4678 long double ceil( long double ); 4679 4679 4680 float trunc( float );^\index {trunc@\lstinline$trunc$}^4680 float trunc( float );^\indexc{trunc}^ 4681 4681 double trunc( double ); 4682 4682 long double trunc( long double ); 4683 4683 4684 float rint( float );^\index {rint@\lstinline$rint$}^4684 float rint( float );^\indexc{rint}^ 4685 4685 long double rint( long double ); 4686 4686 long int rint( float ); … … 4691 4691 long long int rint( long double ); 4692 4692 4693 long int lrint( float );^\index {lrint@\lstinline$lrint$}^4693 long int lrint( float );^\indexc{lrint}^ 4694 4694 long int lrint( double ); 4695 4695 long int lrint( long double ); … … 4698 4698 long long int llrint( long double ); 4699 4699 4700 float nearbyint( float );^\index {nearbyint@\lstinline$nearbyint$}^4700 float nearbyint( float );^\indexc{nearbyint}^ 4701 4701 double nearbyint( double ); 4702 4702 long double nearbyint( long double ); 4703 4703 4704 float round( float );^\index {round@\lstinline$round$}^4704 float round( float );^\indexc{round}^ 4705 4705 long double round( long double ); 4706 4706 long int round( float ); … … 4711 4711 long long int round( long double ); 4712 4712 4713 long int lround( float );^\index {lround@\lstinline$lround$}^4713 long int lround( float );^\indexc{lround}^ 4714 4714 long int lround( double ); 4715 4715 long int lround( long double ); … … 4723 4723 4724 4724 \begin{lstlisting}[escapechar=^] 4725 float copysign( float, float );^\index {copysign@\lstinline$copysign$}^4725 float copysign( float, float );^\indexc{copysign}^ 4726 4726 double copysign( double, double ); 4727 4727 long double copysign( long double, long double ); 4728 4728 4729 float frexp( float, int * );^\index {frexp@\lstinline$frexp$}^4729 float frexp( float, int * );^\indexc{frexp}^ 4730 4730 double frexp( double, int * ); 4731 4731 long double frexp( long double, int * ); 4732 4732 4733 float ldexp( float, int );^\index {ldexp@\lstinline$ldexp$}^4733 float ldexp( float, int );^\indexc{ldexp}^ 4734 4734 double ldexp( double, int ); 4735 4735 long double ldexp( long double, int ); 4736 4736 4737 [ float, float ] modf( float );^\index {modf@\lstinline$modf$}^4737 [ float, float ] modf( float );^\indexc{modf}^ 4738 4738 float modf( float, float * ); 4739 4739 [ double, double ] modf( double ); … … 4742 4742 long double modf( long double, long double * ); 4743 4743 4744 float nextafter( float, float );^\index {nextafter@\lstinline$nextafter$}^4744 float nextafter( float, float );^\indexc{nextafter}^ 4745 4745 double nextafter( double, double ); 4746 4746 long double nextafter( long double, long double ); 4747 4747 4748 float nexttoward( float, long double );^\index {nexttoward@\lstinline$nexttoward$}^4748 float nexttoward( float, long double );^\indexc{nexttoward}^ 4749 4749 double nexttoward( double, long double ); 4750 4750 long double nexttoward( long double, long double ); 4751 4751 4752 float scalbn( float, int );^\index {scalbn@\lstinline$scalbn$}^4752 float scalbn( float, int );^\indexc{scalbn}^ 4753 4753 double scalbn( double, int ); 4754 4754 long double scalbn( long double, int ); 4755 4755 4756 float scalbln( float, long int );^\index {scalbln@\lstinline$scalbln$}^4756 float scalbln( float, long int );^\indexc{scalbln}^ 4757 4757 double scalbln( double, long int ); 4758 4758 long double scalbln( long double, long int ); … … 4766 4766 When creating and computing with rational numbers, results are constantly reduced to keep the numerator and denominator as small as possible. 4767 4767 4768 \begin{lstlisting} 4768 \begin{lstlisting}[escapechar=^] 4769 4769 // implementation 4770 struct Rational { 4770 struct Rational {^\indexc{Rational}^ 4771 4771 long int numerator, denominator; // invariant: denominator > 0 4772 4772 }; // Rational
Note: See TracChangeset
for help on using the changeset viewer.