[squeak-dev] Logarithmic interval ?
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Sun Feb 3 17:37:19 UTC 2019
Hi karl,
This is not a logarithmic interval. The progression should be geometric,
that is with a constant ratio.
x3/x2 = (x2/x1).
The ith element of geometric serie should be something like
(ratio raisedTo: i-1) * start.
Le dim. 3 févr. 2019 à 18:15, karl ramberg <karlramberg at gmail.com> a écrit :
> I used a workaround that probably is more flexible since I have several
> variables that need the logarithm
>
> steps := 100.
> xLog := 0.02 log: steps.
> yLog := 1.894 log: steps
> 1 to: steps do:[:i|
> x := i raisedTo: xLog.
> y := i raisedTo: yLog.
> ]
>
> Best,
> Karl
>
>
>
> On Sun, Feb 3, 2019 at 5:10 PM Nicolas Cellier <
> nicolas.cellier.aka.nice at gmail.com> wrote:
>
>> Yes,
>> But i don't remember if published somewhere... I'll check this evening or
>> tomorrow
>>
>> Le dim. 3 févr. 2019 à 16:43, karl ramberg <karlramberg at gmail.com> a
>> écrit :
>>
>>> Hi,
>>> Does anybody know of a logarithmic interval implementation in Squeak
>>> where the steps in the interval go by logarithmic scale instead of linear ?
>>>
>>> Best,
>>> Karl
>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190203/5778b191/attachment.html>
More information about the Squeak-dev
mailing list
|