Bitter almonds contain traces of hydrocyanic acid, which can be lethal to animals and humans. 7 to 10 unprocessed bitter almonds can be lethal to a human, according to “Encyclopedia Brittanica.”
The sale of raw bitter almonds is prohibited in some countries but it's quite often to find bitter almonds mixed with sweet ones.
My question is: How does food industry to detect the bitter ones?
If you just eat some almonds at home you are unlikely to swallow big quantities of poison because you would spit out the bitter ones.
But when the almonds are processed to make some raw preparation everything gets mixed and the presence of minimum quantities of bitter almonds would be perceptible, unpleasant and even dangerous. I guess they don't throw everything to the bin.
The toxicity of the poison is destroyed by heat and processing, usually by boiling or baking them. Thus my concern is about raw preparations. How are bitter almonds detected? (*) Or how is prussic acid removed without affecting the food?
How is their flavour used at Disaronno or Amaretto leaving out the poison?. I have friends that drunk a whole bottle in one night and are still alive.
(*) of course without performing a chemical analysis to each almond nor using spectrography nor having somebody tasting every almond.
https://en.wikipedia.org/wiki/Amaretto PD: Some spirits use apricot kernel instead, but the problem is the same.