Coder Social home page Coder Social logo

Comments (5)

jolyonb avatar jolyonb commented on June 2, 2024

Here's some of the replacements we want:

  • conj(...) -> {:(...)^*:} with option set
  • trans(...) -> {:(...)^T:}
  • adj(...) -> {:(...)^dagger:}
  • ctrans(...) -> {:(...)^dagger:}
  • cross(..., ...) -> (...) times (...)
  • [a,b,c] -> [[a],[b],[c]] with option set if a, b, and c don't have square brackets in them
  • fact(...) and factorial(...) -> factorialAsciiMath((...))

Here's the dagger symbol definition:

// Add the dagger symbol, used in Hermitian conjugate/adjoint
AM.newsymbol({input:"dagger", tag:"mi", output:"\u2020", tex:null, ttype:AM.TOKEN.CONST});

In all cases, single character entries should not have parentheses. That includes all entries in this list:

['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'alpha', 'beta', 'chi', 'delta', 'Delta', 'epsi', 'varepsilon', 'eta', 'gamma', 'Gamma', 'iota', 'kappa', 'lambda', 'Lambda', 'lamda', 'Lamda', 'mu', 'nu', 'omega', 'Omega', 'phi', 'varphi', 'Phi', 'pi', 'Pi', 'psi', 'Psi', 'rho', 'sigma', 'Sigma', 'tau', 'theta', 'vartheta', 'Theta', 'upsilon', 'xi', 'Xi', 'zeta']

Note that we should also let hat or vec prepend any item in this list.

from mitx-grading-library.

jolyonb avatar jolyonb commented on June 2, 2024

After #116, the only features I don't have a good way to implement are the following two:

  • cross(..., ...) -> (...) times (...)
  • [a,b,c] -> [[a],[b],[c]] with option set if a, b, and c don't have square brackets in them

Both of these need splitList to work.

from mitx-grading-library.

ChristopherChudzicki avatar ChristopherChudzicki commented on June 2, 2024

I'll work on splitList. Another thing I have been thinking about is some minor validation. In particular, I think that the callback actions toreplaceFunctionCall should verify that they have received the correct number of arguments.

This isn't an issue now (since with splitList not implemented, args is always a list of length 1). But once we have splitList, our current implementation of factorial would render fact(3, 4) as 3! (completely ignoring the 4). So I want to throw errors unless the correct number of arguments has been received. That way:

fact(5) ---> 5!
fact(5, 6) ---> fact(5, 6)

from mitx-grading-library.

jolyonb avatar jolyonb commented on June 2, 2024

That sounds look a good idea.

from mitx-grading-library.

jolyonb avatar jolyonb commented on June 2, 2024

Resolved by #116 and #118.

from mitx-grading-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.