forked from jleffler/scc-snapshots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scc-test.hexfloat.cpp
44 lines (40 loc) · 1.33 KB
/
scc-test.hexfloat.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
@(#)File: $RCSfile: scc-test.hexfloat.cpp,v $
@(#)Version: $Revision: 1.1 $
@(#)Last changed: $Date: 2016/05/30 21:29:47 $
@(#)Purpose: Hexadecimal floating point constants (C99 and later)
@(#)Author: J Leffler
@(#)Copyright: (C) JLSS 2016
@(#)Product: SCC Version 8.0.3 (2022-05-30)
*/
// There is evidence from G++ 6.1.0 that C++17 (C++1z) will support
// hexadecimal floating point.
// G++ accepts them unless invoked with an explicit standard
// (-std=c++14, for example).
const float xf01 = 0xA.BP-1; // Testing tail comment behaviour (again)
const float xf02 = 0xABCP-1;
const float xf03 = 0x.ABP-1;
const float xf04 = 0XA.BP+2;
const float xf05 = 0XABCP+2;
const float xf06 = 0X.ABP+2;
const float xf07 = 0XA.BP36;
const float xf08 = 0XABCP36;
const float xf09 = 0X.ABP36;
const float xf11 = 0x8.7P-1;
const float xf12 = 0x87CP-1;
const float xf13 = 0x.87P-1;
const float xf14 = 0X8.7P+2;
const float xf15 = 0X87CP+2;
const float xf16 = 0X.87P+2;
const float xf17 = 0X8.7P36;
const float xf18 = 0X87CP36;
const float xf19 = 0X.87P36;
const float xf21 = 0xa.bp-1;
const float xf22 = 0xabcp-1;
const float xf23 = 0x.abp-1;
const float xf24 = 0xa.bp+2;
const float xf25 = 0xabcp+2;
const float xf26 = 0x.abp+2;
const float xf27 = 0xa.bp36;
const float xf28 = 0xabcp36;
const float xf29 = 0x.abp36;