Skip to content

Conversation

ChrisRackauckas
Copy link
Member

Summary

This PR fixes a syntax error in the getting started documentation where a multiplication operator was missing between a numeric literal and a function call.

Problem

In the pendulum example, the external torque was defined as:

M = t -> 0.1sin(t)

This is invalid Julia syntax. While you can write 2x for multiplication with variables, you cannot write 0.1sin(t) - you need an explicit multiplication operator between a numeric literal and a function call.

Solution

Fixed the syntax to:

M = t -> 0.1 * sin(t)

Impact

This fixes a syntax error that would cause the code example to fail when users try to execute it, improving the user experience when following the getting started tutorial.

🤖 Generated with Claude Code

Add missing multiplication operator between 0.1 and sin(t) in the
pendulum external torque definition. In Julia, you cannot write
0.1sin(t) - you need 0.1 * sin(t) for the multiplication operator.

This fixes a syntax error that would cause the code example to fail
when executed.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas ChrisRackauckas deleted the fix-multiplication-operator-syntax branch July 23, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant