profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/jwmerrill/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Jason Merrill jwmerrill Desmos, Inc. San Francisco, CA https://www.shapeoperator.com Lead calculator engineer, Desmos Inc. Sometimes a physicist.

JuliaImages/Images.jl 454

An image library for Julia

jwmerrill/elm-animation-frame 19

An Elm Signal that is synchronized with the monitor's refresh rate.

desmosinc/gifsmos 16

A web app for creating animated GIFs from Desmos graphs

jwmerrill/factor 2

My copy of the factor programming language

jwmerrill/async-script-load-benchmark 0

Benchmark of asynchronously loading many scripts

jwmerrill/browserstack-cli 0

A command line interface for the browserstack api

jwmerrill/Calculus.jl 0

Calculus functions in Julia

jwmerrill/chrome-51-voiceover-crash 0

Chrome 51 VoiceOver crash demonstration

jwmerrill/Color.jl 0

Basic color manipulation utilities.

PullRequestReviewEvent

Pull request review commentdesmosinc/mathquill

Short-circuit efficient latex update if old and new values are identical

 Controller.open(function(_, super_) {     }   };   _.renderLatexMathEfficiently = function (latex) {-    var oldLatex, oldClassification;+    var root = this.root;+    var oldLatex = this.exportLatex();+    if (root.ends[L] && root.ends[R] && oldLatex === latex) {

Can you explain a little more about why this is necessary?

What's a situation where exportLatex returns something, but these aren't populated? Are we deferring rendering if the mathquill isn't visible or something like that?

sclower

comment created time in 9 days

PullRequestReviewEvent

Pull request review commentdesmosinc/mathquill

Short-circuit efficient latex update if old and new values are identical

 Controller.open(function(_, super_) {     return true;   };   _.renderLatexMathFromScratch = function (latex) {+    this.rendered = true;

What does this do? Wondering if this is functional, or left over from debugging.

sclower

comment created time in 9 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentdesmosinc/mathquill

Consolidate ARIA label update code and use hidden span for static math

 var Controller = P(function(_) {     }     return this;   };+  _.setAriaLabel = function(ariaLabel) {+    if (ariaLabel && typeof ariaLabel === 'string' && ariaLabel !== '') {+      this.ariaLabel = ariaLabel;+    } else if (this.editable) {+      this.ariaLabel = 'Math Input';+    } else {+      this.ariaLabel = '';+    }+    // If this field doesn't have focus, update its computed mathspeak value.+    // We check for focus because updating the aria-label attribute of a focused element will cause most screen readers to announce the new value (in our case, label along with the expression's mathspeak).+    // If the field does have focus at the time, it will be updated once a blur event occurs.+    // Unless we stop using fake text inputs and emulating screen reader behavior, this is going to remain a problem.+    if (!this.containerHasFocus()) {+      this.updateMathspeak();+    }+    return this;+  };+  _.getAriaLabel = function () {+    if (this.ariaLabel !== 'Math Input') {+      return this.ariaLabel;+    } else if (this.editable) {+      return 'Math Input';+    } else {+      return '';+    }+  };+  _.setAriaPostLabel = function(ariaPostLabel, timeout) {+    if(ariaPostLabel && typeof ariaPostLabel === 'string' && ariaPostLabel!='') {

Missing whitespace between if and ( and around the final != on this line. I really miss prettier when it's not around...

sclower

comment created time in 13 days

Pull request review commentdesmosinc/mathquill

Consolidate ARIA label update code and use hidden span for static math

   position: absolute;   left: -1000px;   top: -1000px;-  width: 1px;-  height: 1px;+  width: 0px;+  height: 0px;

Curious about the switch from 1px to 0px here. On the face of it, 0px makes sense to me, but wondering if you know why 1px was chosen before, and also whether switch to 0px fixes some known bug/bad behavior?

sclower

comment created time in 13 days

PullRequestReviewEvent

issue commentmathquill/mathquill

Selecting text with mouse inside TextBlock fails

Related:

  • https://github.com/mathquill/mathquill/issues/736
  • https://github.com/mathquill/mathquill/issues/800
drgrice1

comment created time in 21 days

push eventdesmosinc/mathquill

Jason Merrill

commit sha 6c9feed58e683814ee3a0fb7445e3ba72bcb278a

Interpret → as \to when it is pasted in

view details

Jason Merrill

commit sha 60ec867edc80690731a6546a4383b3f63d0627c4

Merge pull request #159 from desmosinc/to-arrow-unicode Interpret → as \to when it is pasted in

view details

push time in a month

create barnchdesmosinc/mathquill

branch : to-arrow-unicode

created branch time in a month

push eventdesmosinc/mathquill

Jason Merrill

commit sha 23b0dd6e881fe22c09c18db4f442ffacb0bcae59

Writing -> converts to \to arrow

view details

Jason Merrill

commit sha 86a986381ebda471370d784e5086200ac9d74a5f

Merge pull request #154 from desmosinc/to-arrow-digraph Writing -> converts to \to arrow

view details

push time in a month

PR merged desmosinc/mathquill

Writing -> converts to \to arrow

Writing - followed by > should produce \to (a kind of right facing arrow), and deleting once from \to should produce -.

Follows a similar implementation pattern as > followed by = producing \gt, or ~ followed by ~ producing \approx.

+65 -3

1 comment

3 changed files

jwmerrill

pr closed time in a month

push eventdesmosinc/mathquill

Jason Merrill

commit sha 23b0dd6e881fe22c09c18db4f442ffacb0bcae59

Writing -> converts to \to arrow

view details

push time in a month

push eventdesmosinc/mathquill

Steve Clower

commit sha 999deb5757b354bddac3b33aa8f24547a48630e8

Improve mathspeak for text blocks In particular, apply the same ignoreShorthand logic to start text and end text announcements that we use to differentiate block editing vs. generic reading.

view details

Steve Clower

commit sha 0da38da93d91600bad108eba77f7b06dd992e5c3

Improve mathspeak for font style, textcolor, and class blocks For general mathspeak computation, ignore the start and end block delimiters. Speak them when navigating. Also stops separating individual letters inside style blocks so they are read aloud as normal text.

view details

Steve Clower

commit sha 103d04ed660f9e7a84f6fd43ef93796fd5dd2e0c

Continue to speak start and end delimiters for overline

view details

Steve Clower

commit sha 7f88540a699918fbcb30233449c235486dc08323

Pair back delimiter omission to only text and mathrm commands Also adds tests.

view details

Steve Clower

commit sha e355e7c069522da14fded3c7874d7e138a2c67bc

Be sure to pass mathspeak opts on to child blocks from math style command

view details

Steve Clower

commit sha 2c283dc2df71481fafcb44af51105aeb4f340f80

Use options object in style initialiation for clarity

view details

Stephen Clower

commit sha 64f83a3c8bb7e9df93eb983c810a54b902b1d0be

Merge pull request #158 from desmosinc/improve-text-and-style-mathspeak Improve Mathspeak for Text Blocks

view details

Jason Merrill

commit sha 12a032fa50929df2521e90db9f592c61d1a56565

Writing -> converts to \to arrow

view details

push time in a month

PullRequestReviewEvent

Pull request review commentdesmosinc/mathquill

Improve Mathspeak for Text Blocks

 var MathBlock = P(MathElement, function(_, super_) {         }         var mathspeakText = cmd.mathspeak();         var cmdText = cmd.ctrlSeq;-        if (isNaN(cmdText) && cmdText !== '.') {+        if (+          isNaN(cmdText) &&+          cmdText !== '.' &&+          (!cmd.parent || !cmd.parent.parent || !cmd.parent.parent.isTextBlock())

Why is the text block two levels of parent up? What's the direct parent?

sclower

comment created time in a month

PullRequestReviewEvent

Pull request review commentdesmosinc/mathquill

Improve Mathspeak for Text Blocks

 var SVG_SYMBOLS = { };  var Style = P(MathCommand, function(_, super_) {-  _.init = function(ctrlSeq, tagName, attrs, ariaLabel) {+  _.init = function(ctrlSeq, tagName, attrs, ariaLabel, shouldNotSpeakDelimiters) {     super_.init.call(this, ctrlSeq, '<'+tagName+' '+attrs+'>&0</'+tagName+'>');     _.ariaLabel = ariaLabel || ctrlSeq.replace(/^\\/, '');     _.mathspeakTemplate = ['Start' + _.ariaLabel + ',', 'End' + _.ariaLabel];+    // In most cases, mathspeak should announce the start and end of style blocks.+    // There is one exception currently (mathrm).+    _.shouldNotSpeakDelimiters = !!shouldNotSpeakDelimiters;+  };+  _.mathspeak = function(opts) {+    if (+      !this.shouldNotSpeakDelimiters ||+      (opts && opts.ignoreShorthand)+    ) {+      return super_.mathspeak.call(this);+    }+    return this.foldChildren('', function(speech, block) {+      return speech + ' ' + block.mathspeak(opts);+    }).trim();   }; });  //fonts-LatexCmds.mathrm = bind(Style, '\\mathrm', 'span', 'class="mq-roman mq-font"', 'Roman Font');+LatexCmds.mathrm = P(Style, function(_, super_) {+  _.init = function() {+    super_.init.call(this, '\\mathrm', 'span', 'class="mq-roman mq-font"', 'Roman Font', true);

I think this call site would be easier to understand if the final argument was an options object instead of an optional boolean.

sclower

comment created time in a month

PullRequestReviewEvent

push eventdesmosinc/mathquill

Steve Clower

commit sha f0a9c49a72a17d04a894806a88ebd0deca13462b

Simplify exponent speech for common whole numbers Currently handles 1 through 3. Anything else returns the existing Superscript/Baseline value as before.

view details

Steve Clower

commit sha 46ef623b15c80b71445b393f426a910c8b3a906e

Simplify whole-number fractions whose denominators < 10 Note: purposefully excludes 1 and 0.

view details

Steve Clower

commit sha c9604846fe0afeee90e8f95b5aee0731d994c277

Improve voicing of simple mixed fractions For example, instead of 1 1 half, speak 1 and 1 half.

view details

Steve Clower

commit sha a34de1ee0a6de0cb49c8c1c64913cd2bd9d8ad4c

Account for whitespace when computing mixed fraction speech

view details

Steve Clower

commit sha 27c67b7b202090f7d85702e1b40747e64c31659c

Allow empty superscripts to be reported again

view details

Steve Clower

commit sha 4415d74e883baf7746f7d779c1dd8dd9652e69bf

Use regEx for shortened fraction speech computation

view details

Steve Clower

commit sha e829952d7579281b0185dcba8dbc2f422bff9db2

Change numeric test regexp in block.foldChildren function

view details

Steve Clower

commit sha 2b5739138d50c08cc052a3765a87579bbe095bf4

Distinguish 'minus' and 'negative' speech e.g. the - inside 1-3 is read as minus, and -1 is read as negative.

view details

Steve Clower

commit sha 52dd856b168aa1975921d6dc11b7e56c6525e93b

Add more robust superscript shortening

view details

Steve Clower

commit sha 04f36c3bfc29bd35b25f7cf8db3d3de22e289977

Never use shorthand speech when issuing ARIA alerts Alerts are fired only when the user is editing an expression. For these cases, it is vital to ensure the technical form of part of an expression is spoken to avoid ambiguity. For instance, Tabbing out of a superscript of 2 results in Mathquill saying 'out of superscript, 2, baseline' instead of 'out of squared.'

view details

Steve Clower

commit sha 20387bcee25f9bb99f4bbdea0c0487cd3f4f59e0

Add missing 1st suffix check for shortened exponents

view details

Steve Clower

commit sha dcfb81b1b47f4f914583509d288ef437fe01eb83

Add positive/plus dictinction to mathspeak Same logic as negative/minus.

view details

Steve Clower

commit sha 0b7223c272c3931fb53e41c8f1a8150ace530c12

Limit exponent suffix addition to absolute values < 1000 From feedback, adding the suffix for large numbers is not as meaningful, especially when using Mac VoiceOver.

view details

Steve Clower

commit sha 8bf8f66ed369d8a8bf36e11b3f658a65776e496c

Tidy up some typing errors found in tests

view details

Steve Clower

commit sha 1469d4fe94bc1ff5d005952c2499a655e25a587f

Revert some fraction-related changes In particular, restore the prior mathspeak fallback behavior and template generation so that backspacing inside fractions works properly again.

view details

Steve Clower

commit sha b742efc5030398540b533afa9cb8d250b3630e43

Add tests and fix superscripts

view details

Steve Clower

commit sha 6242822a6d48eb94b3c565d141822da285aef3c1

Fix shortening of fractions with negative numerators

view details

Steve Clower

commit sha 59151ca097166de92f159ac9250a4f317b05a413

Remove negative exponent with non-numeric base restriction

view details

Steve Clower

commit sha f8cde7d88005c8ebcd7ffe55ca4762edcbf9c0a3

Respond to code review

view details

Steve Clower

commit sha d931bde89f555abf54260fd5ca33431a656b9a29

Factor isBinaryOperator into stand-alone function

view details

push time in 2 months

Pull request review commentdesmosinc/mathquill

Improve how common whole number combinations are spoken

 suite('typing with auto-replaces', function() {     });   }); +  suite('MathspeakShorthand', function() {+    test('fractions', function() {+      // Testing singular numeric fractions from 1/2 to 1/10+      mq.latex('\\frac{1}{2}');+      assertMathspeak('1 half');+      mq.latex('\\frac{1}{3}');+      assertMathspeak('1 third');+      mq.latex('\\frac{1}{4}');+      assertMathspeak('1 quarter');+      mq.latex('\\frac{1}{5}');+      assertMathspeak('1 fifth');+      mq.latex('\\frac{1}{6}');+      assertMathspeak('1 sixth');+      mq.latex('\\frac{1}{7}');+      assertMathspeak('1 seventh');+      mq.latex('\\frac{1}{8}');+      assertMathspeak('1 eighth');+      mq.latex('\\frac{1}{9}');+      assertMathspeak('1 ninth');+      mq.latex('\\frac{1}{10}');+      assertMathspeak('StartFraction, 1 Over 10, EndFraction');++      // Testing plural numeric fractions from 31/2 to 31/10+      mq.latex('\\frac{31}{2}');+      assertMathspeak('31 halves');+      mq.latex('\\frac{31}{3}');+      assertMathspeak('31 thirds');+      mq.latex('\\frac{31}{4}');+      assertMathspeak('31 quarters');+      mq.latex('\\frac{31}{5}');+      assertMathspeak('31 fifths');+      mq.latex('\\frac{31}{6}');+      assertMathspeak('31 sixths');+      mq.latex('\\frac{31}{7}');+      assertMathspeak('31 sevenths');+      mq.latex('\\frac{31}{8}');+      assertMathspeak('31 eighths');+      mq.latex('\\frac{31}{9}');+      assertMathspeak('31 ninths');+      mq.latex('\\frac{31}{10}');+      assertMathspeak('StartFraction, 31 Over 10, EndFraction');++      // Fractions with negative numerators should be shortened+      mq.latex('\\frac{-1}{2}');+      assertMathspeak('negative 1 half');+      mq.latex('\\frac{-3}{2}');+      assertMathspeak('negative 3 halves');++      // Traditional fractions should be spoken if either numerator or denominator are not numeric+      mq.latex('\\frac{x}{2}');+      assertMathspeak('StartFraction, "x" Over 2, EndFraction');+      mq.latex('\\frac{2}{x}');+      assertMathspeak('StartFraction, 2 Over "x", EndFraction');++      // Traditional fractions should be spoken if either numerator or denominator are not whole numbers+      mq.latex('\\frac{1.2}{2}');+      assertMathspeak('StartFraction, 1.2 Over 2, EndFraction');+      mq.latex('\\frac{4}{2.3}');+      assertMathspeak('StartFraction, 4 Over 2.3, EndFraction');

Could we add a test that negative denominators are not shortened?

sclower

comment created time in 2 months

Pull request review commentdesmosinc/mathquill

Improve how common whole number combinations are spoken

 var Class = LatexCmds['class'] = P(MathCommand, function(_, super_) {   }; }); +// This test is used to determine whether an item may be treated as a whole number+// for shortening the verbalized (mathspeak) forms of some fractions and superscripts.+var intRgx = /^[\+\-]?[\d]+$/;++// Traverses the top level of the passed block's children and returns the concatenation of their ctrlSeq properties.+// Used in shortened mathspeak computations as a block's .text() method can be potentially expensive.+//+function getCtrlSeqsFromBlock(block) {+  if (+    typeof(block) !== 'object' ||+    typeof(block.children) !== 'function'+  )+    return block;+  var children = block.children();+  if (!children || !children.ends[L]) return block;+  var chars = '';+  for (var sibling = children.ends[L]; sibling[R] !== undefined; sibling = sibling[R]) {+    chars += sibling.ctrlSeq;

Is ctrlSeq always defined?

sclower

comment created time in 2 months

Pull request review commentdesmosinc/mathquill

Improve how common whole number combinations are spoken

 suite('typing with auto-replaces', function() {     });   }); +  suite('MathspeakShorthand', function() {+    test('fractions', function() {+      // Testing singular numeric fractions from 1/2 to 1/10+      mq.latex('\\frac{1}{2}');+      assertMathspeak('1 half');+      mq.latex('\\frac{1}{3}');+      assertMathspeak('1 third');+      mq.latex('\\frac{1}{4}');+      assertMathspeak('1 quarter');+      mq.latex('\\frac{1}{5}');+      assertMathspeak('1 fifth');+      mq.latex('\\frac{1}{6}');+      assertMathspeak('1 sixth');+      mq.latex('\\frac{1}{7}');+      assertMathspeak('1 seventh');+      mq.latex('\\frac{1}{8}');+      assertMathspeak('1 eighth');+      mq.latex('\\frac{1}{9}');+      assertMathspeak('1 ninth');+      mq.latex('\\frac{1}{10}');+      assertMathspeak('StartFraction, 1 Over 10, EndFraction');++      // Testing plural numeric fractions from 31/2 to 31/10+      mq.latex('\\frac{31}{2}');+      assertMathspeak('31 halves');+      mq.latex('\\frac{31}{3}');+      assertMathspeak('31 thirds');+      mq.latex('\\frac{31}{4}');+      assertMathspeak('31 quarters');+      mq.latex('\\frac{31}{5}');+      assertMathspeak('31 fifths');+      mq.latex('\\frac{31}{6}');+      assertMathspeak('31 sixths');+      mq.latex('\\frac{31}{7}');+      assertMathspeak('31 sevenths');+      mq.latex('\\frac{31}{8}');+      assertMathspeak('31 eighths');+      mq.latex('\\frac{31}{9}');+      assertMathspeak('31 ninths');+      mq.latex('\\frac{31}{10}');+      assertMathspeak('StartFraction, 31 Over 10, EndFraction');++      // Fractions with negative numerators should be shortened+      mq.latex('\\frac{-1}{2}');+      assertMathspeak('negative 1 half');+      mq.latex('\\frac{-3}{2}');+      assertMathspeak('negative 3 halves');++      // Traditional fractions should be spoken if either numerator or denominator are not numeric+      mq.latex('\\frac{x}{2}');+      assertMathspeak('StartFraction, "x" Over 2, EndFraction');+      mq.latex('\\frac{2}{x}');+      assertMathspeak('StartFraction, 2 Over "x", EndFraction');++      // Traditional fractions should be spoken if either numerator or denominator are not whole numbers+      mq.latex('\\frac{1.2}{2}');+      assertMathspeak('StartFraction, 1.2 Over 2, EndFraction');+      mq.latex('\\frac{4}{2.3}');+      assertMathspeak('StartFraction, 4 Over 2.3, EndFraction');++      // A number followed by a shortened fraction should include the word "and", and other combinations should not.+      mq.latex('3\\frac{3}{8}');+      assertMathspeak('3 and 3 eighths');+      mq.latex('3\\ \\frac{3}{8}');+      assertMathspeak('3 and 3 eighths');+      mq.latex('3\\frac{3}{x}');+      assertMathspeak('3 StartFraction, 3 Over "x", EndFraction');+      mq.latex('x\\frac{3}{8}');+      assertMathspeak('"x" 3 eighths');

Can we add a test that 1.2 \frac{1}{2} is not spoke with "and" in it? I'm guessing it will be "1.2 1 half", which is a little weird, but still better than "1.2 and 1 half" because the latter implies addition rather than multiplication of these terms.

sclower

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentdesmosinc/mathquill

Improve how common whole number combinations are spoken

 suite('typing with auto-replaces', function() {     });   }); +  suite('MathspeakShorthand', function() {+    test('fractions', function() {+      // Testing singular numeric fractions from 1/2 to 1/10+      mq.latex('\\frac{1}{2}');+      assertMathspeak('1 half');+      mq.latex('\\frac{1}{3}');+      assertMathspeak('1 third');+      mq.latex('\\frac{1}{4}');+      assertMathspeak('1 quarter');+      mq.latex('\\frac{1}{5}');+      assertMathspeak('1 fifth');+      mq.latex('\\frac{1}{6}');+      assertMathspeak('1 sixth');+      mq.latex('\\frac{1}{7}');+      assertMathspeak('1 seventh');+      mq.latex('\\frac{1}{8}');+      assertMathspeak('1 eighth');+      mq.latex('\\frac{1}{9}');+      assertMathspeak('1 ninth');+      mq.latex('\\frac{1}{10}');+      assertMathspeak('StartFraction, 1 Over 10, EndFraction');++      // Testing plural numeric fractions from 31/2 to 31/10+      mq.latex('\\frac{31}{2}');+      assertMathspeak('31 halves');+      mq.latex('\\frac{31}{3}');+      assertMathspeak('31 thirds');+      mq.latex('\\frac{31}{4}');+      assertMathspeak('31 quarters');+      mq.latex('\\frac{31}{5}');+      assertMathspeak('31 fifths');+      mq.latex('\\frac{31}{6}');+      assertMathspeak('31 sixths');+      mq.latex('\\frac{31}{7}');+      assertMathspeak('31 sevenths');+      mq.latex('\\frac{31}{8}');+      assertMathspeak('31 eighths');+      mq.latex('\\frac{31}{9}');+      assertMathspeak('31 ninths');+      mq.latex('\\frac{31}{10}');+      assertMathspeak('StartFraction, 31 Over 10, EndFraction');++      // Fractions with negative numerators should be shortened+      mq.latex('\\frac{-1}{2}');+      assertMathspeak('negative 1 half');+      mq.latex('\\frac{-3}{2}');+      assertMathspeak('negative 3 halves');++      // Traditional fractions should be spoken if either numerator or denominator are not numeric+      mq.latex('\\frac{x}{2}');+      assertMathspeak('StartFraction, "x" Over 2, EndFraction');+      mq.latex('\\frac{2}{x}');+      assertMathspeak('StartFraction, 2 Over "x", EndFraction');++      // Traditional fractions should be spoken if either numerator or denominator are not whole numbers+      mq.latex('\\frac{1.2}{2}');+      assertMathspeak('StartFraction, 1.2 Over 2, EndFraction');+      mq.latex('\\frac{4}{2.3}');+      assertMathspeak('StartFraction, 4 Over 2.3, EndFraction');++      // A number followed by a shortened fraction should include the word "and", and other combinations should not.+      mq.latex('3\\frac{3}{8}');+      assertMathspeak('3 and 3 eighths');+      mq.latex('3\\ \\frac{3}{8}');+      assertMathspeak('3 and 3 eighths');+      mq.latex('3\\frac{3}{x}');+      assertMathspeak('3 StartFraction, 3 Over "x", EndFraction');+      mq.latex('x\\frac{3}{8}');+      assertMathspeak('"x" 3 eighths');+    });++    test('exponents', function() {+      // Test simple superscripts and suffix rules+      mq.latex('x^{0}');+      assertMathspeak('"x" to the 0 power');+      mq.latex('x^{1}');+      assertMathspeak('"x" to the 1st power');+      mq.latex('x^{2}');+      assertMathspeak('"x" squared');+      mq.latex('x^{3}');+      assertMathspeak('"x" cubed');+      mq.latex('x^{4}');+      assertMathspeak('"x" to the 4th power');+      mq.latex('x^{5}');+      assertMathspeak('"x" to the 5th power');+      mq.latex('x^{6}');+      assertMathspeak('"x" to the 6th power');+      mq.latex('x^{7}');+      assertMathspeak('"x" to the 7th power');+      mq.latex('x^{8}');+      assertMathspeak('"x" to the 8th power');+      mq.latex('x^{9}');+      assertMathspeak('"x" to the 9th power');+      mq.latex('x^{10}');+      assertMathspeak('"x" to the 10th power');+      mq.latex('x^{11}');+      assertMathspeak('"x" to the 11th power');+      mq.latex('x^{12}');+      assertMathspeak('"x" to the 12th power');+      mq.latex('x^{13}');+      assertMathspeak('"x" to the 13th power');+      mq.latex('x^{14}');+      assertMathspeak('"x" to the 14th power');+      mq.latex('x^{21}');+      assertMathspeak('"x" to the 21st power');+      mq.latex('x^{22}');+      assertMathspeak('"x" to the 22nd power');+      mq.latex('x^{23}');+      assertMathspeak('"x" to the 23rd power');+      mq.latex('x^{999}');+      assertMathspeak('"x" to the 999th power');+      // Values greater than 1000 have no suffix+      mq.latex('x^{1000}');+      assertMathspeak('"x" to the 1000 power');+      mq.latex('x^{10000000000}');+      assertMathspeak('"x" to the 10000000000 power');++      // Ensure negative exponents are shortened+      mq.latex('10^{-5}');+      assertMathspeak('10 to the negative 5th power');+      mq.latex('x^{-5}');+      assertMathspeak('"x" to the negative 5th power');++      // Superscripts that are not strictly integers should continue to be spoken in longer form

Now wondering if we'll end up wanting to just always speak exponents in the "power" form. E.g it might be nice to have e^{-x^2} be "e to the negative x squared power".

I'm happy to land what we have and consider this as a later extension.

sclower

comment created time in 2 months