Оператор пробела умножает числа
means multiply x by y. This is simply achieved by overloading the space operator for double-precision floating-point values: double operator (double d1, double d2) { return d1*d2; } Or - more explicitly - equivalently double operator ''(double d1, double d2) { return d1*d2; } Given one of these definitions, a physicist can use his (or her) conventional notation rather than the notation that has become conventional among computer scientists: double f(double x, double y, double z) { return a + x y pow z; // using also a user-defined operator pow } Clearly, the space operator has (by default) a precedence lower than pow and higher than +. The
На скриншоте страницы технического документа на английском языке объясняется оператор пробела в C++, который по смыслу умножает числа. Шутка построена на абсурдной идее сделать обычную математическую запись физиков синтаксисом языка программирования; такой скриншот отправляют как реакцию на нелепый или чрезмерно усложнённый код. EN: A page from a technical document explains a C++ space operator that means multiplication. The joke is based on the absurd idea of making physicists’ ordinary mathematical notation valid programming syntax; this screenshot is shared as a reaction to ridiculous or needlessly complicated code.
- @ithueti / 17737 2026-02-25
- Type
- image
- Size
- 800×450 · 54.0 KiB
- Mood
- абсурдный, саркастичный
- Language
- en
- Added