How BASICs compute trigonometric functions