Skip to main content

simd_symlog_scale_8

Function simd_symlog_scale_8 

Source
pub fn simd_symlog_scale_8(
    values: [f64; 8],
    linthresh: f64,
    min: f64,
    max: f64,
    mask: [bool; 8],
) -> ([f64; 8], [bool; 8])
Expand description

Vectorized symlog scale transformation (supports negative values)

Maps values using symmetric logarithmic formula that handles both positive and negative:

  • Linear region |x| < linthresh: t = 0.5 + 0.5 * (x / linthresh)
  • Log region |x| ≥ linthresh: t = 0.5 + 0.5 * sign(x) * ln(|x| / linthresh) / ln(max / linthresh)

Input:

  • values: 8 raw data values (can be positive or negative)
  • linthresh: linear threshold parameter (typically 1% of data range)
  • min, max: scaling bounds (min typically negative, max positive for symlog)
  • mask: validity mask

Output:

  • normalized: 8 normalized values in [0, 1]
  • out_mask: unchanged validity mask