MobilityDB 1.3
Loading...
Searching...
No Matches
Functions
tnumber_mathfuncs.c File Reference

Mathematical operators (+, -, *, /) and functions (round, degrees, ...) for temporal numbers. More...

#include <postgres.h>
#include <utils/float.h>
#include <meos.h>
#include "temporal/temporal.h"
#include "temporal/tnumber_mathfuncs.h"
#include "temporal/type_util.h"
#include "pg_temporal/meos_catalog.h"
#include "pg_temporal/temporal.h"
#include "pg_temporal/type_util.h"

Functions

Datum Add_number_tnumber (PG_FUNCTION_ARGS)
 Return the temporal addition of a number and a temporal number @sqlfn tnumber_add() More...
 
Datum Add_tnumber_number (PG_FUNCTION_ARGS)
 Return the temporal addition of a temporal number and a number @sqlfn tnumber_add() More...
 
Datum Add_tnumber_tnumber (PG_FUNCTION_ARGS)
 Return the temporal addition of two temporal numbers @sqlfn tnumber_add() More...
 
static Datum Arithop_number_tnumber (FunctionCallInfo fcinfo, TArithmetic oper, Datum(*func)(Datum, Datum, meosType))
 Generic arithmetic operator on a number and a temporal number. More...
 
static Datum Arithop_tnumber_number (FunctionCallInfo fcinfo, TArithmetic oper, Datum(*func)(Datum, Datum, meosType))
 Generic arithmetic operator on a temporal number an a number. More...
 
static Datum Arithop_tnumber_tnumber (FunctionCallInfo fcinfo, TArithmetic oper, Datum(*func)(Datum, Datum, meosType))
 Generic arithmetic operator on two temporal numbers. More...
 
Datum Div_number_tnumber (PG_FUNCTION_ARGS)
 Return the temporal division of a number and a temporal number @sqlfn tnumber_div() More...
 
Datum Div_tnumber_number (PG_FUNCTION_ARGS)
 Return the temporal division of a temporal number and a number @sqlfn tnumber_div() More...
 
Datum Div_tnumber_tnumber (PG_FUNCTION_ARGS)
 Return the temporal multiplication of two temporal numbers @sqlfn tnumber_div() More...
 
Datum Float_angular_difference (PG_FUNCTION_ARGS)
 Return the angular difference, i.e., the smaller angle between the two degree values @sqlfn angularDifference() More...
 
Datum Float_degrees (PG_FUNCTION_ARGS)
 Return a number transformed from radians to degrees @sqlfn degrees() More...
 
Datum Mult_number_tnumber (PG_FUNCTION_ARGS)
 Return the temporal multiplication of a number and a temporal number @sqlfn tnumber_mult() More...
 
Datum Mult_tnumber_number (PG_FUNCTION_ARGS)
 Return the temporal multiplication of a temporal number and a number @sqlfn tnumber_mult() More...
 
Datum Mult_tnumber_tnumber (PG_FUNCTION_ARGS)
 Return the temporal multiplication of two temporal numbers @sqlfn tnumber_mult() More...
 
Datum Sub_number_tnumber (PG_FUNCTION_ARGS)
 Return the temporal subtraction of a number and a temporal number @sqlfn tnumber_sub() More...
 
Datum Sub_tnumber_number (PG_FUNCTION_ARGS)
 Return the temporal subtraction of a temporal number and a number @sqlfn tnumber_sub() More...
 
Datum Sub_tnumber_tnumber (PG_FUNCTION_ARGS)
 Return the temporal subtraction of two temporal numbers @sqlfn tnumber_sub() More...
 
Datum Temporal_derivative (PG_FUNCTION_ARGS)
 Return the derivative of a temporal number @sqlfn derivative() More...
 
Datum Tfloat_ceil (PG_FUNCTION_ARGS)
 Return a temporal number rounded up to the nearest integer @sqlfn ceil() More...
 
Datum Tfloat_degrees (PG_FUNCTION_ARGS)
 Return a temporal number transformed from radians to degrees @sqlfn degrees() More...
 
Datum Tfloat_exp (PG_FUNCTION_ARGS)
 Return the natural logarithm of a temporal number @sqlfn ln() More...
 
Datum Tfloat_floor (PG_FUNCTION_ARGS)
 Return a temporal number rounded down to the nearest integer @sqlfn floor() More...
 
Datum Tfloat_ln (PG_FUNCTION_ARGS)
 Return the natural logarithm of a temporal number @sqlfn ln() More...
 
Datum Tfloat_log10 (PG_FUNCTION_ARGS)
 Return the natural logarithm of a temporal number @sqlfn ln() More...
 
Datum Tfloat_radians (PG_FUNCTION_ARGS)
 Return a temporal number transformed from degrees to radians @sqlfn radians() More...
 
Datum Tnumber_abs (PG_FUNCTION_ARGS)
 Return the absolute value of a temporal number @sqlfn abs() More...
 
Datum Tnumber_delta_value (PG_FUNCTION_ARGS)
 Return the delta value of a temporal number @sqlfn deltaValue() More...
 

Detailed Description

Mathematical operators (+, -, *, /) and functions (round, degrees, ...) for temporal numbers.