Skip to content

Redundant function multiply_log vs. lmultiply #3318

Closed

Description

@jachymb

There currently exist two functions multiply_log and lmultiply

They basically do the same thing. IMO they should be consolidated and only one should be kept.

Maybe the other should first get a deprecation warning or something.

Activity

  1. WardBrian commented on May 12, 2026

    @WardBrian
    Member

    Multiply_log was deprecated in the language in favor of lmultiply long ago, but I believe the compiler still generates calls to multiply_log in the math library

  2. jachymb commented on Oct 22, 2026

    @jachymb
    ContributorAuthor

    @WardBrian If I were to clean this up, my idea is to replace all references to multiply_log in the codebase with calls to lmultiply. The question then remains, what to do with multiply_log itself. I see two options:

    1. Make it an inline wrapper calling lmultiply
    2. Remove it entirely both from math and stanc3.

    Thoughts?

  3. WardBrian commented on Oct 22, 2026

    @WardBrian
    Member

    I think we'd probably want to leave the wrapper around until the next time we bump the Math major version (probably when switching to cmake fully? #3463)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions