Forgot password?
 Create new account
Author: abababa

学习Asymptote时的一些问题

[Copy link]

418

Threads

1627

Posts

110K

Credits

Credits
11886

Show all posts

 Author| abababa Posted at 2023-4-16 13:13:33
hbghlyj 发表于 2023-4-15 21:53
Asymptote的作者希望您能否在调试器(例如 gdb)中不使用 -mask 运行并告诉我 glrender.cc 中哪个库生成 ...
这个“调试器”是什么,是编程方面的吗?我不懂这些啊。

3148

Threads

8489

Posts

610K

Credits

Credits
66148
QQ

Show all posts

hbghlyj Posted at 2023-4-18 00:55:32
abababa 发表于 2023-4-16 06:13
这个“调试器”是什么,是编程方面的吗?我不懂这些啊。

我刚找到问题所在了discussion

418

Threads

1627

Posts

110K

Credits

Credits
11886

Show all posts

 Author| abababa Posted at 2023-4-21 17:05:35
hbghlyj 发表于 2023-4-18 03:28
在什么操作系统上测试的
John Bowman说他在Ubuntu 22.04.2和Fedora上测试过,没有出现这个问题。 ...
windows7,但是没有显卡,这个电脑是集成显卡的。

3148

Threads

8489

Posts

610K

Credits

Credits
66148
QQ

Show all posts

hbghlyj Posted at 2023-4-23 02:18:41
明白了👌我也没有显卡,所以我们遇到同样的问题
John说:
if you don't have a graphics card. In that case, you should ./configure --enable-offscreen

418

Threads

1627

Posts

110K

Credits

Credits
11886

Show all posts

 Author| abababa Posted at 2023-4-23 12:03:33
hbghlyj 发表于 2023-4-23 02:18
明白了👌我也没有显卡,所以我们遇到同样的问题
John说:
哦,那是不是加上那个-mask,就表示不用显卡的那个了?

3148

Threads

8489

Posts

610K

Credits

Credits
66148
QQ

Show all posts

hbghlyj Posted at 2023-4-23 19:06:23
abababa 发表于 2023-4-23 05:03
哦,那是不是加上那个-mask,就表示不用显卡的那个了?
不是. 在Command-line option中可以查到-mask意思是Mask fpu exception

3148

Threads

8489

Posts

610K

Credits

Credits
66148
QQ

Show all posts

hbghlyj Posted at 2023-5-8 01:47:34
计算 9! 和 10! 都没问题
画factorial(floor(x))的图象,0≤x≤9得到很长的PDF (2.6 × 128,015.3 mm)
$type out.pdf (3.19 KB, Downloads: 8)
画factorial(floor(x))的图象,0≤x≤10报错
  1. import graph;draw(graph(new real(real x){return factorial(floor(x));},2,10));
Copy the Code

Unrecoverable error: limitcheck in .putdeviceprops
  _shipout(prefix,f,currentpatterns,format,wait,view,t);
          ^
C:\Program Files\Asymptote/plain_shipout.asy: 116.11: runtime: shipout failed

因为画的PDF长度超限了

3148

Threads

8489

Posts

610K

Credits

Credits
66148
QQ

Show all posts

hbghlyj Posted at 2023-5-10 05:01:16

asin(1.000001) = nan🙂

> unitsize(1cm)
> real f(real x){return asin(x);}
> import graph
> draw(graph(f,0,0.5))
成功
> draw(graph(f,0,0.9));
成功
> draw(graph(f,0,1.));
成功 因为$\text{asin}(1)=π/2$
> draw(graph(f,0,1.000001));
Error: /typecheck in /--EPSBoundingBoxCrop--
Operand stack:
   --nostringval--   (%%BoundingBox: -nan nan nan -nan)   --dict:1/2(ro)(G)--   --nostringval--   --nostringval--   (%%BoundingBox: -nan nan nan -nan)   1   -nan   nan   -nan   nan   -nan
Execution stack:
   %interp_exit   .runexec2   --nostringval--   EPSBoundingBoxCrop   --nostringval--   2   %stopped_push   --nostringval--   EPSBoundingBoxCrop   EPSBoundingBoxCrop   false   1   %stopped_push   1990   1   3   %oparray_pop   1989   1   3   %oparray_pop   1988   1   3   %oparray_pop   EPSBoundingBoxCrop   1977   1   3   %oparray_pop   1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   EPSBoundingBoxCrop   --nostringval--   2   %stopped_push   --nostringval--   %ztokenexec_continue   (scanner state)   EPSBoundingBoxCrop   EPSBoundingBoxCrop   EPSBoundingBoxCrop   EPSBoundingBoxCrop   1986   8   3   %oparray_pop   EPSBoundingBoxCrop   1984   11   3   %oparray_pop   EPSBoundingBoxCrop
Dictionary stack:
   --dict:761/1123(ro)(G)--   --dict:0/20(G)--   --dict:79/200(L)--
Current allocation mode is local
Current file position is 57
GPL Ghostscript 9.54.0: Unrecoverable error, exit code 1
  _shipout(prefix,f,currentpatterns,format,wait,view,t);
          ^
C:\Program Files\Asymptote/plain_shipout.asy: 116.11: runtime: shipout failed

奇怪的是,Asymptote并没有抛出浮点数异常,而是正常输出了一个eps文件,但是这个eps文件的bounding box值为nan,所以ghostscript会抛出错误。

手机版Mobile version|Leisure Math Forum

2025-4-20 12:21 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list