Division signAlmost equal to
ASCII 247 is ÷ on Windows and ≈ in old DOS.
÷ (Division Sign) is byte 247 in Windows-1252, Unicode U+00F7. It's the obelus from school arithmetic and calculator keys. Its position causes a quiet regex bug. Windows-1252 and Unicode put ÷ in the middle of the lowercase accented letters, just as × (215) sits among the capitals, so a name pattern like [A-Za-zÀ-ÿ]+, written to allow accented names, also accepts × and ÷. Exclude them explicitly, or use a Unicode letter class such as \p{L}, which leaves both out. Old DOS had ÷ at 246. In UTF-8 it's C3 B7, which misreads as ÷. The HTML entity is ÷.
≈ (Almost Equal To) is byte 247 in code page 437, the original IBM PC character set, and maps to Unicode U+2248. It's the everyday approximately sign, as in π ≈ 3.14. Maths has close relatives that aren't interchangeable with it: ≃ (U+2243) means asymptotically equal, and ≅ (U+2245) marks congruent shapes or isomorphic structures. In plain text people write ~5 min for the same idea, and search won't connect the tilde with ≈. Code page 850 put the cedilla ¸ on this byte. In UTF-8, ≈ is E2 89 88, and the HTML entity is ≈.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 247 is ÷.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u00F7\n"); /* UTF-8: C3 B7 */unsigned char b = 247; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 247 0xF7 */return 0;}
#include <stdio.h>int main(void) {/* Byte 247 is ≈ only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0xF7 is invalid and prints as garbage, often �. */putchar(247);/* char is signed on x86, so a plain char holding 0xF7 is -9.Use unsigned char when you compare or index by byte value. */char c = (char)247;unsigned char u = 247;printf("\n%d %d\n", c, u); /* -9 247 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u2248\n"); /* E2 89 88 */return 0;}
Use / or a stacked fraction anywhere beyond basic arithmetic. The international standard for mathematical notation, ISO 80000-2, advises against ÷ for division, and programming languages and spreadsheets only accept /. ÷ is fine in teaching materials and on calculator keys, where readers expect it.
In Denmark and Norway ÷ can mean minus. On receipts and in commercial text, ÷ 10% can mean minus 10%, a discount rather than a division. Keep that in mind before parsing Nordic figures.
The short code comes from the DOS table, and on a US system 247 there is the almost-equal sign, which is why ≈ appeared. Add the zero, Alt+0247, and Windows uses its own table, where 247 is ÷. That leading zero is the whole difference between the two lookups.
Julia's ≈ is isapprox, which by default only uses a relative tolerance, and a tolerance relative to zero is zero, so nothing but 0 itself counts as close to 0. Pass an absolute tolerance when comparing near zero: `isapprox(x, 0; atol=1e-12)`. Python's math.isclose has the same default and takes abs_tol for this case.
The short code comes from the DOS table, and on a US system 247 there is the almost-equal sign, which is why ≈ appeared. Add the zero, Alt+0247, and Windows uses its own table, where 247 is ÷. That leading zero is the whole difference between the two lookups.