Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Viewed less than a minute ago

2Hbi6W7XJrwp3ZQ1

C gcc 13.2.0

Created at 7 minutes ago

Created by anonymous

Author

anonymous

7 minutes ago

Language

C

Compiler

gcc 13.2.0

Options
Warnings
Compiler Default
no pedantic
Raw compiler options
-lm

Author

anonymous

7 minutes ago

›
99
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
#include <math.h>

#define PI 3.1415926535897932384626

int main(void) {
double x = 100, y = 50;
printf("%a\n", atan2(y, x) * 180 / PI);
printf("%a\n", atan2(y, x) / PI * 180);
return 0;
}

$ gcc prog.c -Wall -Wextra -lm
0x1.a90a731a61dc4p+4
0x1.a90a731a61dc3p+4
Exit Code:
0