Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/12/21 in Posts

  1. dummzeuch

    Search Filter for GExperts ToDoList added

    implemented in revision #3729 for all supported Delphi versions Pressing enter is no longer required. It also allows to scroll through the list with the arrow keys without leaving the filter field.
  2. Lars Fosdal

    Parnassus Bookmarks for Delphi 11 Alexandria?

    When there are reasons, there should be public information - but there is just silence.
  3. Hi there, I just wanted to use MulDiv, and my initial reflex was just take it , but: It seems not to be there in Systems, Math or the other, only in Winapi.Windows is the Windows version. I would bet my left finger that MulDiv should be there, am I missing something. The only thing I can find, from older messages, like this: function MathRound(AValue: Extended): Int64; inline; begin if AValue >= 0 then Result := Trunc(AValue + 0.5) else Result := Trunc(AValue - 0.5); end; function MulDiv(nNumber, nNumerator, nDenominator: Integer): Integer; begin if nDenominator = 0 then Result := -1 else Result := MathRound(Int64(nNumber) * Int64(nNumerator) / nDenominator); end; That looks a way over the top to me, why do they need floating point ? I will use it like this: function MulDiv(nNumber, nNumerator, nDenominator: Integer): Integer; begin if nDenominator = 0 then Result := -1 else Result := (Int64(nNumber) * Int64(nNumerator)) div nDenominator); end; But much better if someone can tell me where can I find a cross-platform, optimized version in the RTL ?
×