$x = ( -95.3009707988281 + -95.1877600585938 ) / 2; $h = uc unpack 'H*', reverse pack 'd', $x; printf("%s\n%.16e\n%s\n", $h, $x, $x);