Skip to content

Conversation

@aki-null
Copy link
Owner

@aki-null aki-null commented Oct 6, 2025

Added

  • Configurable Numeric Precision: New Compiler(IntegerPrecision, FloatPrecision) constructor
    • Integer: Integer (32-bit, default) or Long (64-bit)
    • Float: Float (32-bit, default), Double (64-bit), or Decimal (128-bit)
  • CompiledScript API Expansion: New properties for accessing values at different precisions
    • Added LongValue, DoubleValue, DecimalValue properties
    • Added IntegerPrecision and FloatPrecision properties to query compiler configuration
  • VariableValue API Expansion: Support for all numeric precision types
    • New constructors: VariableValue(long), VariableValue(double), VariableValue(decimal)
    • New properties: LongValue, DoubleValue, DecimalValue with automatic type conversion
  • Precision-Aware Operations: Variables and expressions automatically adapt to compiler precision
    • Variables auto-convert to match compiler precision during evaluation
    • Assignment operators correctly handle cross-precision conversions
    • Original variable types preserved; conversion happens only during expression evaluation

Changed

  • Performance Improvements: Float precision operations optimized
    • Built-in float functions now use MathF instead of casting System.Math
    • Aggressive inlining on hot-path value property accessors
    • Switch expressions used for type dispatch, reducing branching overhead

@aki-null aki-null merged commit 41c9e77 into master Oct 7, 2025
1 check passed
@aki-null aki-null deleted the feature/numeric-precision branch October 7, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants