Questions tagged [tgmath]
7 questions
2
votes
2 answers
What do I need to do to use tgmath on iOS?
I'm compiling my first project with 64 bit support enabled. I'm running into a bunch of compiler warnings about implicit conversions to float. This is happening because I'm using fabsf() and assigning the result to a CGFloat (which is a double,…

Rob Jones
- 4,925
- 3
- 32
- 39
1
vote
1 answer
What does __tg_promote do in tgmath.h
I'm looking at tgmath.h and trying to understand exactly how it selects the correct function based on the size of the input value.
The special sauce seems to be this __tg_promote macro but the deeper I dig the deeper this puzzle gets. Does anyone…

Awesome-o
- 2,002
- 1
- 26
- 38
0
votes
1 answer
implement a function in C99 and GCC
I'm trying to follow this guide to implement the cbrt function in a type-generic way that works for float and double.
My C code:
#include
/* based on…

pts
- 80,836
- 20
- 110
- 183
0
votes
1 answer
Status of tgmath.h in terms of portability across C, C++ compilers
I'm implementing a DSL with a compiler that translates it into C. Our code is self-contained: we provide users with just one main entry point (i.e., void step()), all inputs are given in global variables with simple types (bool, signed/unsigned…

Ivan Perez
- 582
- 2
- 17
0
votes
2 answers
strcmp like interface for comparing numbers in C
I want to make strcmp-like interface for comparing numbers, e.g., ncmp(x, y) that returns an int > 0 if x > y, 0 if x = y, < 0 if x < y in C (not C++).
Although I necessarily do not want to constrain the types, my main interest is to compare signed…

Jay Lee
- 1,684
- 1
- 15
- 27
0
votes
1 answer
ccosl undeclared when trying to use cos(double) from tgmath.h on arm-none-eabi-gcc
Consider the following test code:
#include
void test()
{
double x=cos(4.5);
}
Compiling it as with
arm-none-eabi-gcc test.c -c
on Ubuntu 18.04 (gcc 6.3.1, newlib 2.4.0) works fine, but on Ubuntu 20.04 (gcc 9.2.1, newlib 3.3.0) I…

Ruslan
- 18,162
- 8
- 67
- 136
0
votes
0 answers
tgm register required plugin activation hook not working
I am facing a problem with tgm i have just download the setup from tgm site
http://tgmpluginactivation.com/download/
and when i follow the steps as described on the site and in the downloaded zip file but after follow the steps when i activate my…

Deepak Goyal
- 1,186
- 2
- 13
- 26