MobilityDB 1.1
Functions
tnumber_mathfuncs.c File Reference
#include "pg_general/tnumber_mathfuncs.h"
#include <assert.h>
#include <math.h>
#include <postgres.h>
#include <utils/float.h>
#include <meos.h>
#include "general/lifting.h"
#include "general/temporaltypes.h"
#include "general/tnumber_mathfuncs.h"
#include "general/type_util.h"
#include "pg_general/meos_catalog.h"
#include "pg_general/temporal.h"
#include "pg_general/type_util.h"
Include dependency graph for tnumber_mathfuncs.c:

Functions

PGDLLEXPORT Datum Add_number_tnumber (PG_FUNCTION_ARGS)
 Return the temporal addition of a number and a temporal number. More...
 
PGDLLEXPORT Datum Add_tnumber_number (PG_FUNCTION_ARGS)
 Return the temporal addition of a temporal number and a number. More...
 
PGDLLEXPORT Datum Add_tnumber_tnumber (PG_FUNCTION_ARGS)
 Return the temporal addition of the temporal numbers. More...
 
static Datum arithop_number_tnumber_ext (FunctionCallInfo fcinfo, TArithmetic oper, Datum(*func)(Datum, Datum, meosType, meosType))
 Mathematical operators (+, -, *, /) and functions (round, degrees, ...) for temporal number. More...
 
static Datum arithop_tnumber_number_ext (FunctionCallInfo fcinfo, TArithmetic oper, Datum(*func)(Datum, Datum, meosType, meosType))
 Generic arithmetic operator on a temporal number an a number. More...
 
static Datum arithop_tnumber_tnumber_ext (FunctionCallInfo fcinfo, TArithmetic oper, Datum(*func)(Datum, Datum, meosType, meosType), bool(*tpfunc)(const TInstant *, const TInstant *, const TInstant *, const TInstant *, Datum *, TimestampTz *))
 Generic arithmetic operator on a temporal numbers. More...
 
Datum datum_round_float (Datum value, Datum prec)
 Round a number to a given number of decimal places. More...
 
PGDLLEXPORT Datum Div_number_tnumber (PG_FUNCTION_ARGS)
 Return the temporal division of a number and a temporal number. More...
 
PGDLLEXPORT Datum Div_tnumber_number (PG_FUNCTION_ARGS)
 Return the temporal division of a temporal number and a number. More...
 
PGDLLEXPORT Datum Div_tnumber_tnumber (PG_FUNCTION_ARGS)
 Return the temporal multiplication of the temporal numbers. More...
 
PGDLLEXPORT Datum Mult_number_tnumber (PG_FUNCTION_ARGS)
 Return the temporal multiplication of a number and a temporal number. More...
 
PGDLLEXPORT Datum Mult_tnumber_number (PG_FUNCTION_ARGS)
 Return the temporal multiplication of a temporal number and a number. More...
 
PGDLLEXPORT Datum Mult_tnumber_tnumber (PG_FUNCTION_ARGS)
 Return the temporal multiplication of the temporal numbers. More...
 
PGDLLEXPORT Datum Sub_number_tnumber (PG_FUNCTION_ARGS)
 Return the temporal subtraction of a number and a temporal number. More...
 
PGDLLEXPORT Datum Sub_tnumber_number (PG_FUNCTION_ARGS)
 Return the temporal subtraction of a temporal number and a number. More...
 
PGDLLEXPORT Datum Sub_tnumber_tnumber (PG_FUNCTION_ARGS)
 Return the temporal subtraction of the temporal numbers. More...
 
PGDLLEXPORT Datum Tfloat_degrees (PG_FUNCTION_ARGS)
 Convert a temporal number from radians to degrees. More...
 
PGDLLEXPORT Datum Tfloat_derivative (PG_FUNCTION_ARGS)
 Return the derivative of a temporal number. More...
 
PGDLLEXPORT Datum Tfloat_radians (PG_FUNCTION_ARGS)
 Convert a temporal number from degrees to radians. More...
 
Temporaltfloat_round (const Temporal *temp, Datum digits)
 Round a temporal number to a given number of decimal places. More...
 
PGDLLEXPORT Datum Tfloat_round (PG_FUNCTION_ARGS)
 Round a temporal number to a given number of decimal places. More...
 
PGDLLEXPORT Datum Tnumber_abs (PG_FUNCTION_ARGS)
 Get the absolute value of a temporal number. More...