Search for data types of the same accuracy in several programming languages, for example. C / C ++, D, Go

I am trying to implement a program with floating point numbers using two or more programming languages. The program really says that iterations of 50 KB finally brought the error to a very small value.

In order for my results to be comparable, I wanted to make sure that I use data types of the same precision in different languages. Could you please tell if there is a correspondence between float / double from C / C ++ with data in D and Go. I expect C / C ++ and D to be fairly close in this regard, but not sure. Many thanks.

0
source share
2 answers

, :

  • , , .
  • , .

, ( ) - , , "" (, FPU SSE x86). , FPU x86 80 , 64-, .

, , [ ​​ ] [ ] .

"" ( 64-), " " (, float - 32- - 64- C/++ - , , D, , D).

+2

Go IEEE-754.

(http://golang.org/ref/spec#Numeric_types)

float32     the set of all IEEE-754 32-bit floating-point numbers
float64     the set of all IEEE-754 64-bit floating-point numbers

D, : http://dlang.org/float.html.

C/++ IEEE-754, ++ is_iec559(), , IEEE-754. . : , ++ IEEE 754

+2

All Articles