我的 prompt 是“按 IEEE single-precision 转换 47 B8 05 01”,
deepseek 算出来是 94287.5 ,
claude-3-7-sonnet-20250219 算出来是 94267.8 ,
ChatGPT 官网免费版算的 123871.0 ,
gpt-4o-mini 算的 11264.0
正确答案是 94218.0078125 ,只有这个转换网站是对的 https://www.h-schmidt.net/FloatConverter/IEEE754.html
Decimal Representation: 94218.01
Value actually stored in float: 94218.0078125
Error due to conversion: 0.0021875
Binary Representation 01000111101110000000010100000001
Hexadecimal Representation 47b80501
![]() |
1
icyalala 51 天前
浮点数二进制转为十进制(最短表示且 round to event )是非常复杂的算法: https://github.com/jk-jeon/dragonbox
不调函数别说 AI 了,让真人手算也算不出来 |
![]() |
3
ZRS 51 天前
你让它写代码做转换试试
|
![]() |
4
Perry 51 天前 via iPhone
这种比较 deterministic 的问题就别想着只依赖 AI 做,你可以换个思路,让他写一个 python script 跑一下算出来
|
5
wssjy1234 51 天前
o3mini 算的是对的,不过要提醒算精确值
|
![]() |
6
joyyu 51 天前
|
![]() |
8
msg7086 51 天前
帮你跑了 Gemini 2.5 Pro Exp ,也可以算出正确答案:
(前略) 最终结果: 将整数部分和小数部分相加:94218 + 0.0078125 = 94218.0078125 所以,十六进制 47 B8 05 01 按照 IEEE 754 单精度标准表示的十进制浮点数是 94218.0078125 。 不过 Gemini 2.0 Flash 算不对,尾数数 0 的时候数错个数了。 这方面思考模型应该更强一些,更容易自己纠正自己做错的部分。 |
![]() |
9
passive 51 天前 via Android
IEEE745 好像是不规定 endian 的
|
![]() |
11
xiangyuecn 50 天前
小端:2.456045448813471e-38 == new Float32Array(new Uint8Array([0x47,0xB8,0x05,0x01]).buffer)[0]
大端:94218.0078125 == new Float32Array(new Uint8Array([0x47,0xB8,0x05,0x01].reverse()).buffer)[0] 试了一下 deepseek ,结果确实是胡说八道 |
12
horizon 50 天前
你就好比让人口算,但不许用计算器。
然后呢? |
![]() |
13
min 50 天前
按 IEEE 745 single-precision 转换 47 B8 05 01 到 10 进制,注意小数部分的精度准确。
o3-mini-high gemini-2.5-pro 可以做对 |