Joe Riel

9660 Reputation

23 Badges

20 years, 9 days

MaplePrimes Activity


These are replies submitted by Joe Riel

For no good reason I'd favor the less precise, but equivalent given the restricted input, procedure
check_all_faces := proc(l::list)
    {1,2,3,4,5,6} subset {l[]};
end:
This provides a nice application of the Rational procedure I posted a while ago. It generates "unnormalized rationals."
Rational := proc(num::integer,den::integer)
    sscanf(sprintf("#%m%m",num,den),"%m")[];
end proc:

Rational(1,1); sqrt(%);
                                      1/1

                                       1

Rational(-1,1); sqrt(%);
                                     -1/1

                                       I

Rational(1,-1); sqrt(%);
                                     1/-1

                                      -I

Rational(-1,-1); sqrt(%);
                                      -1
                                      --
                                      -1

                                      -1
This provides a nice application of the Rational procedure I posted a while ago. It generates "unnormalized rationals."
Rational := proc(num::integer,den::integer)
    sscanf(sprintf("#%m%m",num,den),"%m")[];
end proc:

Rational(1,1); sqrt(%);
                                      1/1

                                       1

Rational(-1,1); sqrt(%);
                                     -1/1

                                       I

Rational(1,-1); sqrt(%);
                                     1/-1

                                      -I

Rational(-1,-1); sqrt(%);
                                      -1
                                      --
                                      -1

                                      -1
What version of Maple are you using? The second ran fine in Maple 11. Note that you can remove the with(linalg) statement, it is not used.
What version of Maple are you using? The second ran fine in Maple 11. Note that you can remove the with(linalg) statement, it is not used.
Yes, I discovered the same thing some time ago. While slightly annoying, particularly because I frequently make minor corrections after posting, it is understandable. Material is moved to the front page manually; if an edited blog remained on the front page then one could introduce nefarious content that escaped the moderator's eye. It also seems unreasonable to have the moderator continually rereading edited blogs. On the other hand, it seems unlikely that "nefarious content" would be introduced...
I wasn't all that impressed with "God Created the Integers." I hoped for some commentary from Hawking; maybe I was expecting too much, considering. Spivak's translation (in "A Comprehensive Intro. to Diff. Geom, vol 2") of Riemann's lecture on Manifolds is more readable and includes actual commentary.
I wasn't all that impressed with "God Created the Integers." I hoped for some commentary from Hawking; maybe I was expecting too much, considering. Spivak's translation (in "A Comprehensive Intro. to Diff. Geom, vol 2") of Riemann's lecture on Manifolds is more readable and includes actual commentary.
The two conditionals in the `index/makeIndex` should be combined so that the test isn't repeated. That is
`index/makeIndex` := proc(indices::list,array::Array,value::list)
  if nargs = 2 then 
    array[op(indices)];
  else
    array[op(indices)] := (indices = op(value));
  end if:
end proc:
Could you explain a bit more? When you write, "most operations will switch it to sqrt(-1/(x-1)), which does not have the same branch cut," do you mean that the branch cut that Maple chooses for the two expressions are different? If so, what are those branch cuts and how can we know what Maple uses?
Could you explain a bit more? When you write, "most operations will switch it to sqrt(-1/(x-1)), which does not have the same branch cut," do you mean that the branch cut that Maple chooses for the two expressions are different? If so, what are those branch cuts and how can we know what Maple uses?
Maybe the default input format should be "Plain Text." If so, then each user should be able to configure the default format using "account settings." I like to use html for displaying code and would be slightly annoyed at having to change the format with each submission.
Maybe the default input format should be "Plain Text." If so, then each user should be able to configure the default format using "account settings." I like to use html for displaying code and would be slightly annoyed at having to change the format with each submission.
That is an easy workaround, but I don't believe that the plain text format allows indenting, which means that the displayed code is really hard to read. I wrote the following emacs function to do the replacement.
(defun htmlize (n)
  "Convert special character region from POINT to MARK to be HTML compatible.
If called with a prefix argument, unconvert the characters."
  (interactive "*P")
  (save-excursion
    (save-restriction
      (widen)
      (narrow-to-region (point) (mark))
      (let ((replacements '(("&" . "&")
			    ("<" . "&lt;")
			    (">" . "&gt;")
			    ))
	    replace from to)
	(while replacements
	  (setq replace (car replacements)
		replacements (cdr replacements))
	  (if n
	      (setq to (car replace)
		    from (cdr replace))
	    (setq from (car replace)
		  to (cdr replace)))
	  (goto-char (point-min))
	  (while (search-forward from nil t)
	    (replace-match to nil t)))))))
If called with a prefix argument (C-u M-x htmlize) it undoes the change.
That is an easy workaround, but I don't believe that the plain text format allows indenting, which means that the displayed code is really hard to read. I wrote the following emacs function to do the replacement.
(defun htmlize (n)
  "Convert special character region from POINT to MARK to be HTML compatible.
If called with a prefix argument, unconvert the characters."
  (interactive "*P")
  (save-excursion
    (save-restriction
      (widen)
      (narrow-to-region (point) (mark))
      (let ((replacements '(("&" . "&amp;")
			    ("<" . "&lt;")
			    (">" . "&gt;")
			    ))
	    replace from to)
	(while replacements
	  (setq replace (car replacements)
		replacements (cdr replacements))
	  (if n
	      (setq to (car replace)
		    from (cdr replace))
	    (setq from (car replace)
		  to (cdr replace)))
	  (goto-char (point-min))
	  (while (search-forward from nil t)
	    (replace-match to nil t)))))))
If called with a prefix argument (C-u M-x htmlize) it undoes the change.
First 165 166 167 168 169 170 171 Last Page 167 of 195