ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
arithmetics.cpp
1// #################################################################################################
2// ALib C++ Library
3//
4// Copyright 2013-2024 A-Worx GmbH, Germany
5// Published under 'Boost Software License' (a free software license, see LICENSE.txt)
6// #################################################################################################
8#if !DOXYGEN
9
11#include <math.h>
12
13#define ARG0 (*args)
14#define ARG1 (*(args+1))
15#define BOL(box) (box).Unbox<bool >()
16#define INT(box) (box).Unbox<integer>()
17#define ITF(box) static_cast<double>((box).Unbox<integer>() )
18#define BTF(box) static_cast<double>((box).Unbox<bool >() )
19#define FLT(box) (box).Unbox<double >()
20#define FUNC( name,...) Box name( Scope& scope, \
21 ArgIterator args, \
22 ArgIterator end ) \
23 { (void) scope; (void) args; (void) end; __VA_ARGS__ }
24
25#if !ALIB_FEAT_BOXING_BIJECTIVE_INTEGRALS
26# define TOINT(arg) arg
27#else
28# define TOINT(arg) static_cast<integer>(arg)
29#endif
30
31
32namespace alib { namespace expressions { namespace plugins {
33
34
35FUNC( ToBoolean , return args->Call<FIsTrue>(); )
36
37namespace {
38
39
40// #################################################################################################
41// ### Arithmetics - constants
42// #################################################################################################
43
44Box constTrue = true;
45Box constFalse = false;
46Box identity = nullptr;
47Box bool_false = false;
48Box bool_true = true;
49Box int_0 = static_cast<integer>( 0 );
50Box int_1 = static_cast<integer>( 1 );
51Box float_0 = 0.0;
52Box float_1 = 1.0;
53
54
55// #################################################################################################
56// ### Arithmetics - Functions
57// #################################################################################################
58FUNC( toInt_B , return static_cast<integer>(BOL(ARG0)); )
59FUNC( toInt_I , return ARG0; )
60FUNC( toInt_F , return static_cast<integer>(FLT(ARG0)); )
61FUNC( toFloat_B, return static_cast<double >(BOL(ARG0)); )
62FUNC( toFloat_I, return static_cast<double >(INT(ARG0)); )
63FUNC( toFloat_F, return ARG0; )
64
65FUNC( arrLen, return ARG0.UnboxLength(); )
66
67
68// #################################################################################################
69// ### Arithmetics - unary operations
70// #################################################################################################
71
72FUNC( pos , return ARG0; )
73FUNC( pos_B , return static_cast<integer>(BOL(ARG0)); )
74FUNC( neg_B , return -static_cast<integer>(BOL(ARG0)); )
75FUNC( neg_I , return -INT(ARG0); )
76FUNC( neg_F , return -FLT(ARG0); )
77FUNC( bitNot , return ~INT(ARG0); )
78FUNC( boolNot_B, return !BOL(ARG0); )
79FUNC( boolNot_I, return INT(ARG0) == static_cast<integer>(0); )
80FUNC( boolNot_F, return FLT(ARG0) == 0.0; )
81
82
83// #################################################################################################
84// ### Arithmetics - binary operations
85// #################################################################################################
86
87#if defined(_MSC_VER)
88 #pragma warning( push )
89 #pragma warning( disable : 4804 ) // unsafe use of type bool
90 #pragma warning( disable : 4805 ) // unsafe mix of type bool and int
91#endif
92
93FUNC( mul_BB, return BOL(ARG0) * BOL(ARG1) ; )
94FUNC( mul_BI, return BOL(ARG0) * INT(ARG1) ; )
95FUNC( mul_BF, return BOL(ARG0) * FLT(ARG1) ; )
96FUNC( mul_IB, return INT(ARG0) * BOL(ARG1) ; )
97FUNC( mul_II, return INT(ARG0) * INT(ARG1) ; )
98FUNC( mul_IF, return ITF(ARG0) * FLT(ARG1) ; )
99FUNC( mul_FB, return FLT(ARG0) * BTF(ARG1) ; )
100FUNC( mul_FI, return FLT(ARG0) * ITF(ARG1) ; )
101FUNC( mul_FF, return FLT(ARG0) * FLT(ARG1) ; )
102FUNC( div_BI, return BOL(ARG0) / INT(ARG1) ; )
103FUNC( div_BF, return BOL(ARG0) / FLT(ARG1) ; )
104FUNC( div_II, return INT(ARG0) / INT(ARG1) ; )
105FUNC( div_IF, return ITF(ARG0) / FLT(ARG1) ; )
106FUNC( div_FI, return FLT(ARG0) / ITF(ARG1) ; )
107FUNC( div_FF, return FLT(ARG0) / FLT(ARG1) ; )
108FUNC( mod_BI, return BOL(ARG0) % INT(ARG1) ; )
109FUNC( mod_II, return INT(ARG0) % INT(ARG1) ; )
110FUNC( mod_BF, return fmod(BOL(ARG0), FLT(ARG1)); )
111FUNC( mod_FI, return fmod(FLT(ARG0), INT(ARG1)); )
112FUNC( mod_IF, return fmod(INT(ARG0), FLT(ARG1)); )
113FUNC( mod_FF, return fmod(FLT(ARG0), FLT(ARG1)); )
114
115FUNC( add_BB, return BOL(ARG0) + BOL(ARG1) ; )
116FUNC( add_BI, return BOL(ARG0) + INT(ARG1) ; )
117FUNC( add_BF, return BOL(ARG0) + FLT(ARG1) ; )
118FUNC( add_IB, return INT(ARG0) + BOL(ARG1) ; )
119FUNC( add_II, return INT(ARG0) + INT(ARG1) ; )
120FUNC( add_IF, return ITF(ARG0) + FLT(ARG1) ; )
121FUNC( add_FB, return FLT(ARG0) + BOL(ARG1) ; )
122FUNC( add_FI, return FLT(ARG0) + ITF(ARG1) ; )
123FUNC( add_FF, return FLT(ARG0) + FLT(ARG1) ; )
124FUNC( sub_BB, return BOL(ARG0) - BOL(ARG1) ; )
125FUNC( sub_BI, return BOL(ARG0) - INT(ARG1) ; )
126FUNC( sub_BF, return BOL(ARG0) - FLT(ARG1) ; )
127FUNC( sub_IB, return INT(ARG0) - BOL(ARG1) ; )
128FUNC( sub_II, return INT(ARG0) - INT(ARG1) ; )
129FUNC( sub_IF, return ITF(ARG0) - FLT(ARG1) ; )
130FUNC( sub_FB, return FLT(ARG0) - BOL(ARG1) ; )
131FUNC( sub_FI, return FLT(ARG0) - ITF(ARG1) ; )
132FUNC( sub_FF, return FLT(ARG0) - FLT(ARG1) ; )
133
134FUNC( shfL_BI, return TOINT( BOL(ARG0) << INT(ARG1) ); )
135FUNC( shfL_IB, return INT(ARG0) << BOL(ARG1) ; )
136FUNC( shfL_II, return INT(ARG0) << INT(ARG1) ; )
137FUNC( shfR_BI, return TOINT( BOL(ARG0) << INT(ARG1) ); )
138FUNC( shfR_IB, return INT(ARG0) << BOL(ARG1) ; )
139FUNC( shfR_II, return INT(ARG0) >> INT(ARG1) ; )
140
141FUNC( sm_BB, return BOL(ARG0) < BOL(ARG1) ; )
142FUNC( sm_BI, return BOL(ARG0) < INT(ARG1) ; )
143FUNC( sm_BF, return isless(static_cast<double>(BOL(ARG0)), FLT(ARG1) ); )
144FUNC( sm_IB, return INT(ARG0) < BOL(ARG1) ; )
145FUNC( sm_II, return INT(ARG0) < INT(ARG1) ; )
146FUNC( sm_IF, return isless(static_cast<double>(INT(ARG0)), FLT(ARG1) ); )
147FUNC( sm_FB, return isless( FLT(ARG0) , static_cast<double>(BOL(ARG1))); )
148FUNC( sm_FI, return isless( FLT(ARG0) , static_cast<double>(INT(ARG1))); )
149FUNC( sm_FF, return isless( FLT(ARG0) , FLT(ARG1) ); )
150FUNC( smeq_BB, return BOL(ARG0) <= BOL(ARG1) ; )
151FUNC( smeq_BI, return BOL(ARG0) <= INT(ARG1) ; )
152FUNC( smeq_BF, return islessequal(static_cast<double>(BOL(ARG0)), FLT(ARG1) ); )
153FUNC( smeq_IB, return INT(ARG0) <= BOL(ARG1) ; )
154FUNC( smeq_II, return INT(ARG0) <= INT(ARG1) ; )
155FUNC( smeq_IF, return islessequal(static_cast<double>(INT(ARG0)), FLT(ARG1) ); )
156FUNC( smeq_FB, return islessequal( FLT(ARG0) , static_cast<double>(BOL(ARG1))); )
157FUNC( smeq_FI, return islessequal( FLT(ARG0) , static_cast<double>(INT(ARG1))); )
158FUNC( smeq_FF, return islessequal( FLT(ARG0) , FLT(ARG1) ); )
159FUNC( gt_BB, return BOL(ARG0) > BOL(ARG1) ; )
160FUNC( gt_BI, return BOL(ARG0) > INT(ARG1) ; )
161FUNC( gt_BF, return isgreater(static_cast<double>(BOL(ARG0)), FLT(ARG1) ); )
162FUNC( gt_IB, return INT(ARG0) > BOL(ARG1) ; )
163FUNC( gt_II, return INT(ARG0) > INT(ARG1) ; )
164FUNC( gt_IF, return isgreater(static_cast<double>(INT(ARG0)), FLT(ARG1) ); )
165FUNC( gt_FB, return isgreater( FLT(ARG0) , static_cast<double>(BOL(ARG1))); )
166FUNC( gt_FI, return isgreater( FLT(ARG0) , static_cast<double>(INT(ARG1))); )
167FUNC( gt_FF, return isgreater( FLT(ARG0) , FLT(ARG1) ); )
168FUNC( gteq_BB, return BOL(ARG0) >= BOL(ARG1) ; )
169FUNC( gteq_BI, return BOL(ARG0) >= INT(ARG1) ; )
170FUNC( gteq_BF, return isgreaterequal(static_cast<double>(BOL(ARG0)), FLT(ARG1) ); )
171FUNC( gteq_IB, return INT(ARG0) >= BOL(ARG1) ; )
172FUNC( gteq_II, return INT(ARG0) >= INT(ARG1) ; )
173FUNC( gteq_IF, return isgreaterequal(static_cast<double>(INT(ARG0)), FLT(ARG1) ); )
174FUNC( gteq_FB, return isgreaterequal( FLT(ARG0) , static_cast<double>(BOL(ARG1))); )
175FUNC( gteq_FI, return isgreaterequal( FLT(ARG0) , static_cast<double>(INT(ARG1))); )
176FUNC( gteq_FF, return isgreaterequal( FLT(ARG0) , FLT(ARG1) ); )
177
178FUNC( eq_BB, return BOL(ARG0) == BOL(ARG1) ; )
179FUNC( eq_BI, return BOL(ARG0) == INT(ARG1) ; )
180FUNC( eq_BF, return std::fabs( BOL(ARG0) - FLT(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
181FUNC( eq_IB, return INT(ARG0) == BOL(ARG1) ; )
182FUNC( eq_II, return INT(ARG0) == INT(ARG1) ; )
183FUNC( eq_IF, return std::fabs( ITF(ARG0) - FLT(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
184FUNC( eq_FB, return std::fabs( FLT(ARG0) - BOL(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
185FUNC( eq_FI, return std::fabs( FLT(ARG0) - ITF(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
186FUNC( eq_FF, return std::fabs( FLT(ARG0) - FLT(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
187
188
189
190FUNC( neq_BB, return BOL(ARG0) != BOL(ARG1) ; )
191FUNC( neq_BI, return BOL(ARG0) != INT(ARG1) ; )
192FUNC( neq_BF, return std::fabs( BOL(ARG0) - FLT(ARG1) ) > std::numeric_limits<double>::epsilon(); )
193FUNC( neq_IB, return INT(ARG0) != BOL(ARG1) ; )
194FUNC( neq_II, return INT(ARG0) != INT(ARG1) ; )
195FUNC( neq_IF, return std::fabs( INT(ARG0) - INT(ARG1) ) > std::numeric_limits<double>::epsilon(); )
196FUNC( neq_FB, return std::fabs( FLT(ARG0) - BOL(ARG1) ) > std::numeric_limits<double>::epsilon(); )
197FUNC( neq_FI, return std::fabs( FLT(ARG0) - ITF(ARG1) ) > std::numeric_limits<double>::epsilon(); )
198FUNC( neq_FF, return std::fabs( FLT(ARG0) - FLT(ARG1) ) > std::numeric_limits<double>::epsilon(); )
199
200
201FUNC( bitAnd, return INT(ARG0) & INT(ARG1) ; )
202FUNC( bitXOr, return INT(ARG0) ^ INT(ARG1) ; )
203FUNC( bitOr , return INT(ARG0) | INT(ARG1) ; )
204FUNC( boolAnd_BB, return BOL(ARG0) && BOL(ARG1) ; )
205FUNC( boolAnd_BI, return BOL(ARG0) && INT(ARG1) != 0 ; )
206FUNC( boolAnd_BF, return BOL(ARG0) && FLT(ARG1) != 0.0 ; )
207FUNC( boolAnd_IB, return INT(ARG0) != 0 && BOL(ARG1) ; )
208FUNC( boolAnd_II, return INT(ARG0) != 0 && INT(ARG1) != 0 ; )
209FUNC( boolAnd_IF, return INT(ARG0) != 0 && FLT(ARG1) != 0.0 ; )
210FUNC( boolAnd_FB, return FLT(ARG0) != 0.0 && BOL(ARG1) ; )
211FUNC( boolAnd_FI, return FLT(ARG0) != 0.0 && INT(ARG1) != 0 ; )
212FUNC( boolAnd_FF, return FLT(ARG0) != 0.0 && FLT(ARG1) != 0.0 ; )
213FUNC( boolOr_BB, return BOL(ARG0) || BOL(ARG1) ; )
214FUNC( boolOr_BI, return BOL(ARG0) || INT(ARG1) != 0 ; )
215FUNC( boolOr_BF, return BOL(ARG0) || FLT(ARG1) != 0.0 ; )
216FUNC( boolOr_IB, return INT(ARG0) != 0 || BOL(ARG1) ; )
217FUNC( boolOr_II, return INT(ARG0) != 0 || INT(ARG1) != 0 ; )
218FUNC( boolOr_IF, return INT(ARG0) != 0 || FLT(ARG1) != 0.0 ; )
219FUNC( boolOr_FB, return FLT(ARG0) != 0.0 || BOL(ARG1) ; )
220FUNC( boolOr_FI, return FLT(ARG0) != 0.0 || INT(ARG1) != 0 ; )
221FUNC( boolOr_FF, return FLT(ARG0) != 0.0 || FLT(ARG1) != 0.0 ; )
222
223#if defined(_MSC_VER)
224 #pragma warning( pop )
225#endif
226
227Calculus::OperatorTableEntry OperatorTable[] =
228{
229 // unary operators
240
241 // binary operators
362};
363
364Calculus::OperatorAliasTableEntry bitwiseOpsAliasBooleanOps[] =
365{
366 { A_CHAR("&"), Types::Boolean, Types::Boolean ,A_CHAR("&&") },
367 { A_CHAR("&"), Types::Boolean, Types::Integer ,A_CHAR("&&") },
368 { A_CHAR("&"), Types::Boolean, Types::Float ,A_CHAR("&&") },
369 { A_CHAR("&"), Types::Integer, Types::Boolean ,A_CHAR("&&") },
370 { A_CHAR("&"), Types::Float , Types::Boolean ,A_CHAR("&&") },
371 { A_CHAR("|"), Types::Boolean, Types::Boolean ,A_CHAR("||") },
372 { A_CHAR("|"), Types::Boolean, Types::Integer ,A_CHAR("||") },
373 { A_CHAR("|"), Types::Boolean, Types::Float ,A_CHAR("||") },
374 { A_CHAR("|"), Types::Integer, Types::Boolean ,A_CHAR("||") },
375 { A_CHAR("|"), Types::Float , Types::Boolean ,A_CHAR("||") },
376};
377
378Calculus::BinaryOpOptimizationsTableEntry binaryOperatorOptimizations[] =
379{
380 // optimizations with LEFT side constant value
381 { A_CHAR("||"), lang::Side::Left , bool_true , Types::Boolean, bool_true },
382 { A_CHAR("||"), lang::Side::Left , bool_false, Types::Boolean, identity },
383 { A_CHAR("&&"), lang::Side::Left , bool_true , Types::Boolean, identity },
384 { A_CHAR("&&"), lang::Side::Left , bool_false, Types::Boolean, bool_false },
385
386 { A_CHAR("+") , lang::Side::Left , int_0 , Types::Integer, identity },
387 { A_CHAR("+") , lang::Side::Left , float_0 , Types::Float , identity },
388 { A_CHAR("-") , lang::Side::Left , int_0 , Types::Integer, identity },
389 { A_CHAR("-") , lang::Side::Left , float_0 , Types::Float , identity },
390
391 { A_CHAR("*") , lang::Side::Left , int_0 , Types::Integer, int_0 },
392 { A_CHAR("*") , lang::Side::Left , int_1 , Types::Integer, identity },
393 { A_CHAR("*") , lang::Side::Left , float_0 , Types::Float , float_0 },
394 { A_CHAR("*") , lang::Side::Left , float_1 , Types::Float , identity },
395
396
397 // optimizations with RIGHT side constant value (repeat from above)
398 { A_CHAR("||"), lang::Side::Right, bool_true , Types::Boolean, bool_true },
399 { A_CHAR("||"), lang::Side::Right, bool_false, Types::Boolean, identity },
400 { A_CHAR("&&"), lang::Side::Right, bool_true , Types::Boolean, identity },
401 { A_CHAR("&&"), lang::Side::Right, bool_false, Types::Boolean, bool_false },
402
403 { A_CHAR("+") , lang::Side::Right, int_0 , Types::Integer, identity },
404 { A_CHAR("+") , lang::Side::Right, float_0 , Types::Float , identity },
405 { A_CHAR("-") , lang::Side::Right, int_0 , Types::Integer, identity },
406 { A_CHAR("-") , lang::Side::Right, float_0 , Types::Float , identity },
407
408 { A_CHAR("*") , lang::Side::Right, int_0 , Types::Integer, int_0 },
409 { A_CHAR("*") , lang::Side::Right, int_1 , Types::Integer, identity },
410 { A_CHAR("*") , lang::Side::Right, float_0 , Types::Float , float_0 },
411 { A_CHAR("*") , lang::Side::Right, float_1 , Types::Float , identity },
412
413 // further optimizations with RIGHT side constant value (not available for left-side)
414 { A_CHAR("/") , lang::Side::Right, int_1 , Types::Integer, identity },
415 { A_CHAR("/") , lang::Side::Right, int_1 , Types::Float , identity },
416 { A_CHAR("/") , lang::Side::Right, float_1 , Types::Float , identity },
417
418 { A_CHAR("%") , lang::Side::Right, int_1 , Types::Integer, identity },
419 { A_CHAR("%") , lang::Side::Right, int_1 , Types::Float , identity },
420 { A_CHAR("%") , lang::Side::Right, float_1 , Types::Float , identity },
421};
422
423
424} // anonymous namespace
425
426
427// #################################################################################################
428// ### Arithmetics - Constructor. Creates the hash map
429// #################################################################################################
431: Calculus( "ALib Arithmetics", compiler, CompilePriorities::Arithmetics )
432{
433 constexpr int tableSize= 9;
434 Token functionNames[tableSize];
435 Token::LoadResourcedTokens( EXPRESSIONS, "CPA", functionNames
436 ALIB_DBG(,tableSize) );
438 Token* descriptor= functionNames;
439 ConstantIdentifiers=
440 {
441 { *descriptor++, constTrue },
442 { *descriptor++, constFalse },
443 { *descriptor++, constTrue },
444 { *descriptor++, constFalse },
445 { *descriptor++, constTrue },
446 { *descriptor++, constFalse },
447 };
448
449 Functions=
450 {
451 { *descriptor++, CALCULUS_SIGNATURE(Signatures::Var), CALCULUS_CALLBACK(ToBoolean), &Types::Boolean , CTI },
452 { *descriptor , CALCULUS_SIGNATURE(Signatures::B ), CALCULUS_CALLBACK(toInt_B ), &Types::Integer , CTI },
453 { *descriptor , CALCULUS_SIGNATURE(Signatures::I ), CALCULUS_CALLBACK(toInt_I ), &Types::Integer , CTI },
454 { *descriptor++, CALCULUS_SIGNATURE(Signatures::F ), CALCULUS_CALLBACK(toInt_F ), &Types::Integer , CTI },
455 { *descriptor , CALCULUS_SIGNATURE(Signatures::B ), CALCULUS_CALLBACK(toFloat_B), &Types::Float , CTI },
456 { *descriptor , CALCULUS_SIGNATURE(Signatures::I ), CALCULUS_CALLBACK(toFloat_I), &Types::Float , CTI },
457 { *descriptor++, CALCULUS_SIGNATURE(Signatures::F ), CALCULUS_CALLBACK(toFloat_F), &Types::Float , CTI },
458 };
459
460 AddOperators( OperatorTable );
461
462 if( HasBits(compiler.CfgCompilation, Compilation::AllowBitwiseBooleanOperators ) )
463 {
464 AddOperatorAliases( bitwiseOpsAliasBooleanOps );
465 AddOperatorAlias ( A_CHAR("~"), Types::Boolean, Types::Void, A_CHAR("!") );
466 }
467
468 AddBinaryOpOptimizations( binaryOperatorOptimizations);
469
470 ALIB_ASSERT_ERROR( descriptor - functionNames == tableSize, "EXPR",
471 "Descriptor table size mismatch: Consumed {} descriptors, {} available.",
472 descriptor - functionNames, tableSize)
474}
475
476bool Arithmetics::TryCompilation( CIFunction& ciFunction )
477{
478 if( Calculus::TryCompilation( ciFunction ) )
479 return true;
480
481 if( ciFunction.QtyArgs() == 1 && ciFunction.ArgsBegin->IsArray() )
482 {
483 constexpr int tableSize= 1;
484 Token functionNames[tableSize];
485
486 Token::LoadResourcedTokens( EXPRESSIONS, "CPALen", functionNames
487 ALIB_DBG(,tableSize) );
488
489 if( functionNames[0].Match( ciFunction.Name ) )
490 {
491 ciFunction.Name.Reset( functionNames[0] );
492ALIB_DBG( ciFunction.DbgCallbackName = "arrLen"; )
493
494 // for constants, the callback might b invoked right away (optimizing call out)
495 if( ciFunction.AllArgsAreConst )
496 {
497 ciFunction.TypeOrValue = ciFunction.ArgsBegin->UnboxLength();
498 return true;
499 }
500
501 ciFunction.Callback = arrLen;
502 ciFunction.TypeOrValue = Types::Integer;
503
504 return true;
505 }
506 }
507
508 return false;
509}
510
511}}} // namespace [alib::expressions::detail]
512
513#undef BOL
514#undef INT
515#undef FLT
516#undef FUNC
517#undef FUNC
518#undef UN_MAP_ENTRY
519#undef BIN_MAP_ENTRY
520#undef BIN_ALIAS_ENTRY
521
522
523#endif //ALIB_DOX
decltype(std::declval< typename TFDecl::Signature >()(std::declval< Box & >(), std::declval< TArgs >()...)) Call(TArgs &&... args) const
Definition box.inl:1175
#define A_CHAR(STR)
#define ALIB_WARNINGS_RESTORE
Definition alib.hpp:849
#define CALCULUS_CALLBACK(func)
Definition calculus.hpp:29
#define CALCULUS_SIGNATURE(BoxPointerArray)
Definition calculus.hpp:36
#define ALIB_ASSERT_ERROR(cond,...)
Definition alib.hpp:1271
#define ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE
Definition alib.hpp:760
#define ALIB_DBG(...)
Definition alib.hpp:390
constexpr bool HasBits(TEnum element, TEnum selection) noexcept
ALIB_API Box ToBoolean(Scope &scope, ArgIterator args, ArgIterator)
@ Arithmetics
Collection of built-in unary and binary operators for boolean, integer and floating point values.
@ Right
Denotes the right side of something.
@ Left
Denotes the left side of something.
Definition alib.cpp:69
expressions::plugins::Calculus Calculus
Type alias in namespace alib.
Definition calculus.hpp:851
boxing::FIsTrue FIsTrue
Type alias in namespace alib.
strings::util::Token Token
Type alias in namespace alib.
Definition token.hpp:551
boxing::Box Box
Type alias in namespace alib.
expressions::Compiler Compiler
Type alias in namespace alib.
Definition compiler.hpp:553
lang::integer integer
Type alias in namespace alib.
Definition integers.hpp:273
static ALIB_API Box Void
Sample type-box for C++ type void.
static ALIB_API Box Integer
Sample type-box for integer types. (Precisely for type integer.)
static ALIB_API Box Boolean
Sample type-box for C++ type bool.
static ALIB_API Box Float
Sample type-box for C++ type double.
ALIB_API Arithmetics(Compiler &compiler)
const std::tuple< String, Type, Type, CallbackDecl, Type, CTInvokable > OperatorTableEntry
Definition calculus.hpp:473
static constexpr CTInvokable CTI
Definition calculus.hpp:249
const std::tuple< String, lang::Side, Type, const Box &, const Box & > BinaryOpOptimizationsTableEntry
Definition calculus.hpp:667
const std::tuple< String, Type, Type, String > OperatorAliasTableEntry
Definition calculus.hpp:486