docs: Add math section to syntax reference + improve example comments
- five-syntax-en/ko: Add Math comparison table (Harbour RTL vs Go math) - go_math_compare.prg: Detailed English comments explaining each section - Example lists updated with go_math_compare.prg Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -366,6 +366,34 @@ dbTarget:Close()
|
||||
9. **PARALLEL FOR** — 대량 데이터 자동 병렬 처리
|
||||
10. **Nil-safe `?:`** — 안전한 체이닝, 런타임 에러 방지
|
||||
|
||||
## 수학: Harbour RTL + Go math 동시 사용
|
||||
|
||||
```prg
|
||||
IMPORT "math"
|
||||
|
||||
PROCEDURE Main()
|
||||
// Harbour RTL — 간단, IMPORT 불필요
|
||||
? Abs(-42.5) // 42.5
|
||||
? Sqrt(144) // 12
|
||||
? Round(3.14159, 2) // 3.14
|
||||
|
||||
// Go math — 완전, 60개+ 함수
|
||||
? math.Sin(math.Pi / 6) // 0.5
|
||||
? math.Pow(2, 10) // 1024
|
||||
? math.Hypot(3, 4) // 5
|
||||
|
||||
// 조합 사용
|
||||
? (1 / Sqrt(2 * math.Pi)) * Exp(-0.5 * math.Pow(0, 2))
|
||||
RETURN
|
||||
```
|
||||
|
||||
| | Harbour RTL | Go math |
|
||||
|---|---|---|
|
||||
| 함수 수 | 9개 | 60개+ |
|
||||
| IMPORT | 불<><EBB688><EFBFBD>요 | `IMPORT "math"` |
|
||||
| 삼각함수 | 없음 | Sin, Cos, Tan, ... |
|
||||
| 상수 | 없음 | Pi, E, Phi, ... |
|
||||
|
||||
## 예제 파일
|
||||
|
||||
| 파일 | 설명 |
|
||||
@@ -379,4 +407,5 @@ dbTarget:Close()
|
||||
| `examples/go_concurrent.prg` | 병렬 데이터 파이프라인 |
|
||||
| `examples/go_websocket.prg` | WebSocket 채팅 서버 |
|
||||
| `examples/go_extensions.prg` | 9가지 확장 문법 데모 |
|
||||
| `examples/go_math_compare.prg` | Harbour RTL vs Go math 비교 |
|
||||
| `examples/godump_demo.prg` | HB_FUNC Go API |
|
||||
|
||||
Reference in New Issue
Block a user