Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Macros | Functions
MATH_OVERLOADS.cpp File Reference
#include <math.h>
#include <stdio.h>
#include "config.h"
Include dependency graph for MATH_OVERLOADS.cpp:

Go to the source code of this file.

Macros

#define FUN_1(name, NAME)
 
#define FUN_2(name, NAME)
 
#define FUN_2_PTR(name, NAME)
 
#define FUN_2_INT(name, NAME)
 
#define FUN_2_PINT(name, NAME)
 
#define IF_LDBL   if (1)
 

Functions

const char * type_name (float)
 
const char * type_name (double)
 
const char * type_name (long double)
 
 FUN_1 (abs, "ABS")
 
 FUN_1 (acos, "ACOS")
 
 FUN_1 (asin, "ASIN")
 
 FUN_1 (atan, "ATAN")
 
 FUN_2 (atan2, "ATAN2")
 
 FUN_1 (ceil, "CEIL")
 
 FUN_1 (cos, "COS")
 
 FUN_1 (cosh, "COSH")
 
 FUN_1 (exp, "EXP")
 
 FUN_1 (fabs, "FABS")
 
 FUN_1 (floor, "FLOOR")
 
 FUN_2 (fmod, "FMOD")
 
 FUN_2_PINT (frexp, "FREXP")
 
 FUN_2_INT (ldexp, "LDEXP")
 
 FUN_1 (log, "LOG")
 
 FUN_1 (log10, "LOG10")
 
 FUN_2_PTR (modf, "MODF")
 
 FUN_2 (pow, "POW")
 
 FUN_2_INT (pow, "POW")
 
 FUN_1 (sin, "SIN")
 
 FUN_1 (sinh, "SINH")
 
 FUN_1 (sqrt, "SQRT")
 
 FUN_1 (tan, "TAN")
 
 FUN_1 (tanh, "TANH")
 
int main ()
 

Macro Definition Documentation

◆ FUN_1

#define FUN_1 (   name,
  NAME 
)
Value:
template <class T> \
T name (T) { \
return printf ("#define _RWSTD_NO_%s_%s\n", \
NAME, type_name (T ())); \
} typedef void unused_typedef
#define T
Definition 17.names.cpp:163
const char * type_name()
IMPORT_C SInt32 printf(const Char *,...)
const char * name
Definition codecvt1.cpp:72

Definition at line 43 of file MATH_OVERLOADS.cpp.

◆ FUN_2

#define FUN_2 (   name,
  NAME 
)
Value:
template <class T> \
T name (T, T) { \
return printf ("#define _RWSTD_NO_%s_%s\n", \
NAME, type_name (T ())); \
} typedef void unused_typedef

Definition at line 50 of file MATH_OVERLOADS.cpp.

◆ FUN_2_INT

#define FUN_2_INT (   name,
  NAME 
)
Value:
template <class T> \
T name (T, int) { \
return printf ("#define _RWSTD_NO_%s_%s_INT\n", \
NAME, type_name (T ())); \
} typedef void unused_typedef

Definition at line 64 of file MATH_OVERLOADS.cpp.

◆ FUN_2_PINT

#define FUN_2_PINT (   name,
  NAME 
)
Value:
template <class T> \
T name (T, int*) { \
return printf ("#define _RWSTD_NO_%s_%s\n", \
NAME, type_name (T ())); \
} typedef void unused_typedef

Definition at line 71 of file MATH_OVERLOADS.cpp.

◆ FUN_2_PTR

#define FUN_2_PTR (   name,
  NAME 
)
Value:
template <class T> \
T name (T, T*) { \
return printf ("#define _RWSTD_NO_%s_%s\n", \
NAME, type_name (T ())); \
} typedef void unused_typedef

Definition at line 57 of file MATH_OVERLOADS.cpp.

◆ IF_LDBL

#define IF_LDBL   if (1)

Function Documentation

◆ FUN_1() [1/17]

FUN_1 ( abs  ,
"ABS"   
)

◆ FUN_1() [2/17]

FUN_1 ( acos  ,
"ACOS"   
)

◆ FUN_1() [3/17]

FUN_1 ( asin  ,
"ASIN"   
)

◆ FUN_1() [4/17]

FUN_1 ( atan  ,
"ATAN"   
)

◆ FUN_1() [5/17]

FUN_1 ( ceil  ,
"CEIL"   
)

◆ FUN_1() [6/17]

FUN_1 ( cos  ,
"COS"   
)

◆ FUN_1() [7/17]

FUN_1 ( cosh  ,
"COSH"   
)

◆ FUN_1() [8/17]

FUN_1 ( exp  ,
"EXP"   
)

◆ FUN_1() [9/17]

FUN_1 ( fabs  ,
"FABS"   
)

◆ FUN_1() [10/17]

FUN_1 ( floor  ,
"FLOOR"   
)

◆ FUN_1() [11/17]

FUN_1 ( log  ,
"LOG"   
)

◆ FUN_1() [12/17]

FUN_1 ( log10  ,
"LOG10"   
)

◆ FUN_1() [13/17]

FUN_1 ( sin  ,
"SIN"   
)

◆ FUN_1() [14/17]

FUN_1 ( sinh  ,
"SINH"   
)

◆ FUN_1() [15/17]

FUN_1 ( sqrt  ,
"SQRT"   
)

◆ FUN_1() [16/17]

FUN_1 ( tan  ,
"TAN"   
)

◆ FUN_1() [17/17]

FUN_1 ( tanh  ,
"TANH"   
)

◆ FUN_2() [1/3]

FUN_2 ( atan2  ,
"ATAN2"   
)

◆ FUN_2() [2/3]

FUN_2 ( fmod  ,
"FMOD"   
)

◆ FUN_2() [3/3]

FUN_2 ( pow  ,
"POW"   
)

◆ FUN_2_INT() [1/2]

FUN_2_INT ( ldexp  ,
"LDEXP"   
)

◆ FUN_2_INT() [2/2]

FUN_2_INT ( pow  ,
"POW"   
)

◆ FUN_2_PINT()

FUN_2_PINT ( frexp  ,
"FREXP"   
)

◆ FUN_2_PTR()

FUN_2_PTR ( modf  ,
"MODF"   
)

◆ main()

int main ( void  )

Definition at line 107 of file MATH_OVERLOADS.cpp.

◆ type_name() [1/3]

const char * type_name ( double  )

Definition at line 32 of file MATH_OVERLOADS.cpp.

◆ type_name() [2/3]

const char * type_name ( float  )

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 1999-2007 Rogue Wave Software, Inc.

Definition at line 31 of file MATH_OVERLOADS.cpp.

◆ type_name() [3/3]

const char * type_name ( long double  )

Definition at line 33 of file MATH_OVERLOADS.cpp.