Implement instructions 0x068-0x079: casts and math functions #6

Merged
Kittycannon merged 1 commits from diego/instruc-068-079 into main 2026-04-09 01:12:42 +00:00
Member

Implements the following instructions in Instr_060-07F.cpp:

  • 0x068 D2I: Double (f64) to Integer (i32)
  • 0x069 D2L: Double (f64) to Long (i64)
  • 0x06C SIN: Sine
  • 0x06D COS: Cosine
  • 0x06E TAN: Tangent
  • 0x06F ASIN: Arc Sine
  • 0x070 ACOS: Arc Cosine
  • 0x071 ATAN: Arc Tangent
  • 0x072 ATAN2: Arc Tangent (2 args)
  • 0x074 EXP: Exponential
  • 0x075 LOG: Natural Logarithm
  • 0x076 LOGAB: Logarithm base A of B
  • 0x077 POW: Power
  • 0x078 SQRT: Square Root
  • 0x079 ROOT: General Root

All implementations follow the existing pattern using fetchOperDst/fetchOperSrc and std::cmath functions.

Implements the following instructions in Instr_060-07F.cpp: - 0x068 D2I: Double (f64) to Integer (i32) - 0x069 D2L: Double (f64) to Long (i64) - 0x06C SIN: Sine - 0x06D COS: Cosine - 0x06E TAN: Tangent - 0x06F ASIN: Arc Sine - 0x070 ACOS: Arc Cosine - 0x071 ATAN: Arc Tangent - 0x072 ATAN2: Arc Tangent (2 args) - 0x074 EXP: Exponential - 0x075 LOG: Natural Logarithm - 0x076 LOGAB: Logarithm base A of B - 0x077 POW: Power - 0x078 SQRT: Square Root - 0x079 ROOT: General Root All implementations follow the existing pattern using fetchOperDst/fetchOperSrc and std::cmath functions.
DiegoLopez added 1 commit 2026-04-08 22:17:58 +00:00
Kittycannon merged commit 75f4b160bf into main 2026-04-09 01:12:42 +00:00
Kittycannon deleted branch diego/instruc-068-079 2026-04-09 01:12:42 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SpiderLang/spider-runtime#6