Billy Logan - 8 months ago 102

Pascal Question

Answer

You don't mention the dialect, so I'll assume something still in active use like Lazarus/FPC/Delphi

Squared has a separate function sqr(), as does square root, sqrt(). For other values math.power is used (add math to your uses clause).

So that makes sqr(x)/power(sqrt(16-sqr(x)),3);

As a rule of thumb, the simplest expression gives the best precision.

Source (Stackoverflow)