Read the equation
For scale>1, the adjustment adds 0.1mscaleln(scale) to one. The code returns one for scale≤1. One parameter specifies the context extension, while the other controls adjustment strength; the returned value should not be confused with the input parameter also named mscale.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| scale | Context extension factor |
| mscale | Magnitude-adjustment strength |
How it works
Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.
Assumptions & limits
Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.
Original context
Read the surrounding source passage
are interpolated by the factor of 40.
THE MAGNITUDE CORRECTION
yarn_get_mscale(scale, mscale) = 0.1 * mscale * ln(scale) + 1.0 for scale>1
With scale=40, mscale=1.0: 0.1 * ln(40) + 1.0 = 1.3688879
cos/sin caches are multiplied by _mscale, computed as
yarn_get_mscale(factor, mscale) / yarn_get_mscale(factor, mscale_all_dim)Exact original notation
yarn_get_mscale(scale, mscale) = 0.1 * mscale * ln(scale) + 1.0 for scale>1
Related builds
Sources & provenance
yarn_get_mscale(scale, mscale) = 0.1 * mscale * ln(scale) + 1.0 for scale>1
yarn_get_mscale(scale, mscale) = 0.1 * mscale * ln(scale) + 1.0 for scale>1