Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Can gzip be a language model?(nathan.rs)
    63comments
  2. AMD's random number generator can't generate a 0?(flatassembler.net)
    11comments
  3. MiMo v2.6(xiaomi.com)
    410comments
  4. Spymarks, Not Watermarks(brand.io)
    114comments
  5. I said no and Apple said yes(dbushell.com)
    101comments
  6. Transformers Explained Visually(poloclub.github.io)
    65comments
  7. Attention is all you have(alicegg.tech)
    245comments
  8. What Sun got wrong(dtrace.org)
    344comments
  9. MiMo-v2.6-Pro: Intelligence, Performance and Price Analysis(artificialanalysis.ai)
    20comments
  10. Study: Young users (9 to 18Y) ditch Google for AI, with unknown consequences(norwegianscitechnews.com)
    51comments
  11. I don't want to read what you didn't write(colinbreck.com)
    284comments
  12. AI coding has made CI a bottleneck, so we reworked ours to keep up(linear.app)
    273comments
  13. Looking forward to Git 2.56 – and 3.0(lwn.net)
    61comments
  14. Divide by depth for instant 3D(gabrieloc.com)
    30comments
  15. NASA’s Mars Sample Return mission is dead(science.org)
    329comments
  16. Claude Status – Elevated errors for multiple models(claude.com)
    84comments
  17. Engineering Memory: On learning to memorize first 100 digits of pi (2024)(gregorygundersen.com)
    11comments
  18. What It's Like to Work in One of America's Data Centers(wsj.com)
    3comments
  19. World Wide Words(worldwidewords.org)
    1comments
  20. A font that reads what you wrote(rohanadwankar.github.io)
    8comments
  21. The Advisory Group on Mathematics and Artificial Intelligence(terrytao.wordpress.com)
    66comments
  22. JavaFX 27 Native Image on a Raspberry Pi 5(ennerf.github.io)
    discuss
  23. PDF Forgeries Are Surprisingly Rare (2022)(gwern.net)
    36comments
  24. Used ThinkPad Buyer's Guide (2019)(bobble.tech)
    10comments
  25. Socrates vs. the Written Word (2011)(wondermark.com)
    23comments
  26. Python Workers are now generally available(cloudflare.com)
    38comments
  27. HERMES radio enables voice and data communication over vast distances(ieee.org)
    61comments
  28. How do traffic signals work? (2019)(practical.engineering)
    63comments
  29. Apple Copland D11E4 Booting in the Browser(pagetable.com)
    41comments
  30. Grok 4.7(x.ai)
    489comments

AMD's random number generator can't generate a 0?

41 pointsby 1h agoboard.flatassembler.net
11 comments
16m agoHN ↗

Embarrassing, but probably little practical impact, since these hardware random numbers are typically not used directly and instead seed a CSPRNG.

14m agoHN ↗

It is just possible they decided crypto code that uses it was safer to skip zeros. (Whist mathematically it should be no more likely; it is vastly more likely someone will actually try that key).

It is also possible that their code was generating too many zeros and the easiest fix was to discard them all.

11m agoHN ↗

The probability of generating a zero is incredibly low if you use the normal distribution curve.

So it is not necessarily that it doesn't generate zero, they did not run enough times to increase the probability of actually generating a zero.

5m agoHN ↗

From what I can see they were trying to generate 16bit integers, so the probability is 1 in 65536 and they were running the test for 11 hours.

You definitely would expect a roughly equal number of 0s as any other of those numbers since it's uniformly distributed. And definitely not 0

2m agoHN ↗

This also seems to happen for 16 and 32 bit numbers, so you should be able to see zeros easily.

They also write:

Running the same programs on an Intel processor, and the 0's are there with no problem.

10m agoHN ↗

I'm getting 16-bit zeros on my Zen 3 chip (+1:3821, 0:3893, -1:3895), I will wait to get some statistically significant samples for the 32-bit values and update the forum thread. Maybe it was fixed after Zen 2?

8m agoHN ↗

Well, mathematically speaking, the probability to pick any specific number is exactly 0 (but yes I do see what they mean).

5m agoHN ↗

This is not the first RNG bug on Zen 2, I recall after I first got mine that some application or other would quit immediately at startup because rdrand always returned -1, i.e. all 1s. It was fixed with a microcode update.

Do we now learn that they fixed "always generate all 1s" with "never generate all 0s"??

4m agoHN ↗

Usually you do "rdrand % <some-number>" anyways, and in that case you will still get zeroes. True, your result might be skewed by 1/(maxint/some-number) but I guess that's not a big problem in practice