Carl Love

Carl Love

28025 Reputation

25 Badges

12 years, 311 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@nm What acer means by "unnecessary mappings and conversions" is that your map(x-> select(...), ...could be replaced by

{seq}(select[flatten](type, sol, indexed)); #no map, no (explicit) convert

but, as he said, that still relies on the free variables appearing as isolated entries in the solution vector, which may be an algorithm-dependent feature of LinearSolve (which actually chooses among several algorithms depending on the input type of the data). As I've told you before, select only does a top-level search of a structure; indets searches deep within the structure.

Also, while I personally don't think that ilcm should've been designed to take a list argument, Maple lets you redefine any procedure (even a kernel built-in like ilcm) to take any type of argument(s) that you want, without altering the original usage of the procedure. So here's how to make ilcm take a list or set argument:

restart:
ilcm__orig:= eval(ilcm):
unprotect(ilcm):
ilcm:= overload([
    proc(L::{list, set}, $) option overload; ilcm(L[]) end proc,
    ilcm__orig
]):
protect(ilcm, ilcm__orig):

ilcm([2, 4, 7]);
                               28

 

@nm Sorry that I neglected that possibility. Replace with

indets(sol, typeindex(nonnegint, suffixed(_t)));

Or replace _t with a name constructed as acer suggested.

@Rouben Rostamian  The syntax f(x):= y is very long established (at least 20 years), and indeed absolutely essential, for remember table assignments. It's extensively used in library and package code. So there's no way that that can be changed. The design mistake was to (relatively recently) allow it also for function definition. Since that's only allowed for top-level use and only in 2D input, that usage could be removed without breaking things, I think. 

@wlferguson19 It's a dimensionless number, in this case a ratio of two things with the same units. I think that the Units package can only handle units on the ratio scale of measurement (I'll put a Wikipedia link when I get a chance). AFAIK, it can't handle other scales such as ordinal (e.g., Mohs hardness), difference (e.g., calendar year), or logarithmic (e.g., pH).

@MapleEnthusiast Your expression is simply a polynomial with a huge number of variables  (when you count the indices), a huge number of terms, no coefficients, and a low degree (4 or 5). simplify is too generic to be of much help. Actually, I think that it might make patterns even harder to see. The relevant patterns are in the indices, which simplify won't even look at. Perhaps something can be achieved by encoding the indices as exponents.

Were you able to make use of the sorting procedures that I posted for you in another thread?

I suppose that you've been given a Maple procedure text2num? Have you also been given its inverse num2text? Or are you supposed to write it? Due to the simplicity of the text-to-number encoding, I was able to write num2text without seeing text2num.

Hint: My num2text took 3 lines of code. The most important part is a convert(..., base, ...command. The rest of the decoding took only one line of code, the central part of which is a solve command for the equations, then applying num2text to the numbers found for x, y, and z, then inserting spaces between the words.

@user-JG I strongly disagree with these statements of yours:

  •  While Maple has friendly routines to deal with decomposing polynomials, the analogous
    handling of integer numbers does not seem to have been implemented yet.

  • A proper implementation of routines for dealing with decomposition of numbers would be a nice addition to Maple. Algebra is good, arithmetics is missing.

I think that you're simply unaware of the commands available. Please describe some operations on integers that you'd like, and I'll tell you how to do them.

My question was Why do you want the form
    base, exponent, base, exponent, ....?
The form
    base,        base,        ...
    exponent, exponent, ...
is much more convenient.

Oddly enough, two days ago I started having a similar problem in MaplePrimes, not Maple. This part is exactly as you described: "It looks like the local refreshing problem is following the cursor of the mouse." I'm using Chrome as my browser. I have not had this problem on any other web pages.

@greatpet Maple's applyrule would work for this also were it not for the serious localization bug that I pointed out. My guess is that this bug would be easy to fix. However, subsindets and evalindets are much more reliable than applyrule. Unfortunately, the coding needed to use them is substantially more complicated in this case than that needed for applyrule. For other cases, it's often no more complicated.

@acer It's interesting that ifactors works by calling ifactor and restructuring its output. I would've expected that to be the other way around.

@user-JG I understand why you'd want to remove the initial 1, but why would you want to unpair the exponents from their bases?

Use the green uparrow on the toolbar to attach that as a worksheet.

@tomleslie The Vectorfield command in your procedure f is not needed. The Gradient command already returns a vector field.

@mon And that form from that thesis is not the polynomial given by form= MOD2? Can you show me a small example of the desired form? How about doing it for modus ponens:

((p implies q) and p) implies q 

(just the first thing I thought of). Or you may choose a better example, perhaps directly from that thesis.

First 161 162 163 164 165 166 167 Last Page 163 of 708