Repository navigation
Read a number followed by j or J like 2i - #323
Open
peterbjohnson wants to merge 3 commits into
Open
peterbjohnson wants to merge 3 commits into
peterbjohnson wants to merge 3 commits into
Conversation
Without complexNumbers, `3i+2j+6k` parsed as `3*i + 2*I + 6*k`, because Python reads `2j` as an imaginary literal. The fix is in lambdafeedback-expression-parsing (lambda-feedback-packages#33): `2j` is now `2*j`, a syntax error with strict syntax (like `2i`), and unchanged with complexNumbers. Pins the packages to that branch's commit until it is released, adds tests (from the dropped app-level patch, adjusted: no `1e3j` case, which depends on #322; preview `sympy` keeps the response as typed; strict syntax cases) and documents `2j` under complexNumbers and vectors. Fixes #321. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
peterbjohnson
marked this pull request as ready for review
November 27, 2026 22:31
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #321.
Without
complexNumbers, a vector response3i+2j+6kwas marked wrong against3*i+2*j+6*k. Python's tokenizer reads2jas an imaginary literal, so it became2*I, and input symbols didn't help.The fix is in the package: lambda-feedback/lambda-feedback-packages#33. A number followed by
j/Jnow reads like2i:2*jcomplexNumbers: unchangedThis PR
app/requirements.txt: temporarily pins all four packages to commit7006a92of that PR. Repin to the release tag (e.g.v0.3.0-rc.6) before merging, which is why this is a draft.symbolic_evaluation_test.pyandsymbolic_preview_test.py. They come from the earlier app-level patch, which was dropped, with these changes:1e3jcase is removed. It only passed because Bug: E-notation numbers parse as products with Euler's number whenelementary_functionsis true #322 affects both sides the same way.sympyfield now shows the response as typed (3i+2j+6k).2jis rejected with the same feedback as2i.app/docs/user.md: a note on2jundercomplexNumbers, and a new example "Entering vectors as3i+2j+6k".Checks
requirements.txt: 1281 passed, 2 skipped, 1 xfailed. Onmainit was 1240 passed.mypy app: clean. No new lines over 127 characters.🤖 Generated with Claude Code