Talk:Pi: Difference between revisions

Content added Content deleted
(→‎Deleted GUISS solution: No smartassery, please!)
(→‎Deleted GUISS solution: Note on Java's capabilities)
Line 42: Line 42:
::::I don't know Java. Could you set the precision to a high number of digits, and then System.out.println(Math.PI)? I think a two line solution would be cool. [[User:Markhobley|Markhobley]] 11:23, 24 July 2011 (UTC)
::::I don't know Java. Could you set the precision to a high number of digits, and then System.out.println(Math.PI)? I think a two line solution would be cool. [[User:Markhobley|Markhobley]] 11:23, 24 July 2011 (UTC)
:::::Presumably not, because it would be limited to the precision of the conventional floating point, like most other languages, or does it support arbitrary precision? [[User:Markhobley|Markhobley]] 11:27, 24 July 2011 (UTC)
:::::Presumably not, because it would be limited to the precision of the conventional floating point, like most other languages, or does it support arbitrary precision? [[User:Markhobley|Markhobley]] 11:27, 24 July 2011 (UTC)
:::::: While Java's got arbitrary precision fractions (<tt>java.math.BigDecimal</tt>), it's π value is just IEEE double precision. That's good enough for most work. –[[User:Dkf|Donal Fellows]] 21:18, 24 July 2011 (UTC)
:::In no way does the GUISS solution fit the spirit of the task and should be removed. In what way does it give ''successive'' digits of Pi, "until aborted by the user"? The task description is clearly asking that you use a routine that generates the digits of Pi in sequence - GUISS does not ensure that and so should be removed. The GUISS example does not aid language comparison - it stands out as an anomaly. --[[User:Paddy3118|Paddy3118]] 05:37, 24 July 2011 (UTC)
:::In no way does the GUISS solution fit the spirit of the task and should be removed. In what way does it give ''successive'' digits of Pi, "until aborted by the user"? The task description is clearly asking that you use a routine that generates the digits of Pi in sequence - GUISS does not ensure that and so should be removed. The GUISS example does not aid language comparison - it stands out as an anomaly. --[[User:Paddy3118|Paddy3118]] 05:37, 24 July 2011 (UTC)
::::Hmmm, It does generate the digits o Pi in sequence. There is an abort button on the calculator, but I don't know whether it works midflow. By replacing the desktop calculator with one that uses a bigger display to get more digits and supports abortion midflow. The GUISS solution would fit the task. The limitation is with the tool provided, rather than with GUISS. [[User:Markhobley|Markhobley]] 09:11, 24 July 2011 (UTC)
::::Hmmm, It does generate the digits o Pi in sequence. There is an abort button on the calculator, but I don't know whether it works midflow. By replacing the desktop calculator with one that uses a bigger display to get more digits and supports abortion midflow. The GUISS solution would fit the task. The limitation is with the tool provided, rather than with GUISS. [[User:Markhobley|Markhobley]] 09:11, 24 July 2011 (UTC)