为什么我得不到浮动结果?
Why don't I get a float result?
c2: (x-0.5)^2+y^2=1;
solve(c2,y);
cs2: map(rhs, %);
at(cs2,[x=0.5]);
我希望看到 [-1,1]
,但我却看到了
我该怎么办?
顺便说一句,出于我不知道的原因,maxima 无法绘制此等式。
plot2d(cs2, [x,-2.5,2.5],[same_xy, true]);
plot2d: expression evaluates to non-numeric value everywhere in plotting range.
plot2d: expression evaluates to non-numeric value everywhere in plotting range.
plot2d: nothing to plot.
构建信息:
wxbuild_info();
wxMaxima version: 19.07.0
using wxWidgets version: wxWidgets 3.0.4
Maxima version: 5.43.2
Maxima build date: 2020-02-21 05:22:38
Host type: x86_64-pc-linux-gnu
System type: BSD BSD NIL
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.12
整个输出:
我无法重现您所看到的行为。我编译了 Maxima 5.43.2(版本号在下面的 build_info
输出中略有混淆)但我没有得到你看到的结果。这是我在命令行界面上看到的(我在 wxMaxima 上得到了相同的结果)。
(%i1) c2: (x - 0.5)^2 + y^2 = 1;
2 2
(%o1) y + (x - 0.5) = 1
(%i2) solve (c2, y);
rat: replaced -0.5 by -1/2 = -0.5
2 2
sqrt((- 4 x ) + 4 x + 3) sqrt((- 4 x ) + 4 x + 3)
(%o2) [y = - ------------------------, y = ------------------------]
2 2
(%i3) cs2: map (rhs, %);
2 2
sqrt((- 4 x ) + 4 x + 3) sqrt((- 4 x ) + 4 x + 3)
(%o3) [- ------------------------, ------------------------]
2 2
(%i4) at (cs2, x = 0.5);
(%o4) [- 1.0, 1.0]
(%i5) plot2d(cs2, [x,-2.5,2.5],[same_xy, true]);
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
(%o5) [/tmp/maxout9196.gnuplot, /tmp/maxplot.x11]
plot2d
显示一个圆
郑重声明,build_info
报告:
Maxima version: "5.43.1_10_g5476356eb"
Maxima build date: "2022-01-31 12:13:20"
Host type: "i686-pc-linux-gnu"
Lisp implementation type: "CLISP"
Lisp implementation version: "2.49 (2010-07-07) (built 3605610186) (memory 3852648802)"
User dir: "/home/robert/.maxima"
Temp dir: "/tmp"
Object dir: "/home/robert/tmp/maxima-read-only-git/maxima-code/binary/5_43_1_10_g5476356eb/clisp/2_49__2010_07_07___built_3605610186___memory_3852648802_"
Frontend: false
令人费解的是,您看到 solve
的结果不同。您在命令行 Maxima 或其他方式中得到相同的结果吗?
c2: (x-0.5)^2+y^2=1;
solve(c2,y);
cs2: map(rhs, %);
at(cs2,[x=0.5]);
我希望看到 [-1,1]
,但我却看到了
我该怎么办?
顺便说一句,出于我不知道的原因,maxima 无法绘制此等式。
plot2d(cs2, [x,-2.5,2.5],[same_xy, true]);
plot2d: expression evaluates to non-numeric value everywhere in plotting range.
plot2d: expression evaluates to non-numeric value everywhere in plotting range.
plot2d: nothing to plot.
构建信息:
wxbuild_info();
wxMaxima version: 19.07.0
using wxWidgets version: wxWidgets 3.0.4
Maxima version: 5.43.2
Maxima build date: 2020-02-21 05:22:38
Host type: x86_64-pc-linux-gnu
System type: BSD BSD NIL
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.12
整个输出:
我无法重现您所看到的行为。我编译了 Maxima 5.43.2(版本号在下面的 build_info
输出中略有混淆)但我没有得到你看到的结果。这是我在命令行界面上看到的(我在 wxMaxima 上得到了相同的结果)。
(%i1) c2: (x - 0.5)^2 + y^2 = 1;
2 2
(%o1) y + (x - 0.5) = 1
(%i2) solve (c2, y);
rat: replaced -0.5 by -1/2 = -0.5
2 2
sqrt((- 4 x ) + 4 x + 3) sqrt((- 4 x ) + 4 x + 3)
(%o2) [y = - ------------------------, y = ------------------------]
2 2
(%i3) cs2: map (rhs, %);
2 2
sqrt((- 4 x ) + 4 x + 3) sqrt((- 4 x ) + 4 x + 3)
(%o3) [- ------------------------, ------------------------]
2 2
(%i4) at (cs2, x = 0.5);
(%o4) [- 1.0, 1.0]
(%i5) plot2d(cs2, [x,-2.5,2.5],[same_xy, true]);
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
(%o5) [/tmp/maxout9196.gnuplot, /tmp/maxplot.x11]
plot2d
显示一个圆
郑重声明,build_info
报告:
Maxima version: "5.43.1_10_g5476356eb"
Maxima build date: "2022-01-31 12:13:20"
Host type: "i686-pc-linux-gnu"
Lisp implementation type: "CLISP"
Lisp implementation version: "2.49 (2010-07-07) (built 3605610186) (memory 3852648802)"
User dir: "/home/robert/.maxima"
Temp dir: "/tmp"
Object dir: "/home/robert/tmp/maxima-read-only-git/maxima-code/binary/5_43_1_10_g5476356eb/clisp/2_49__2010_07_07___built_3605610186___memory_3852648802_"
Frontend: false
令人费解的是,您看到 solve
的结果不同。您在命令行 Maxima 或其他方式中得到相同的结果吗?