Ask Your Question

nrsaxena's profile - activity

2020-01-12 13:19:43 +0100 received badge  Famous Question (source)
2019-11-13 20:29:24 +0100 received badge  Notable Question (source)
2019-11-01 18:03:02 +0100 received badge  Popular Question (source)
2019-10-15 05:31:48 +0100 commented answer macOS Catalina does not allow launching Sage app

One update I want to add is that this works only for sage app that is in dmg.app format. The one in command line format under SageMath directory does not work.

2019-10-10 06:09:11 +0100 received badge  Scholar (source)
2019-10-10 06:09:02 +0100 commented answer macOS Catalina does not allow launching Sage app

Thank you so much. Instructions from the web page you linked worked.

2019-10-09 15:04:03 +0100 asked a question macOS Catalina does not allow launching Sage app

It complains that the developer is not verified. Running the app under sudo also does not work.

2017-02-16 17:42:57 +0100 commented question Factorial(10000000) Performance between Ubuntu and Mac OS X on Sage 7.5.1

Thanks. I should have been more specific. I am surprised by this performance difference. I do not think this problem is related to Mac OS X vs GNU/Linux. As some of gcc or Xcode compiled standalone C/C++ programs give similar performance on a similarly equipped Mac or Linux machine. I think the issue might be with the Sage env on Mac OS X.

2017-02-14 02:46:56 +0100 asked a question Factorial(10000000) Performance between Ubuntu and Mac OS X on Sage 7.5.1

On Ubuntu 6.10 and Core i7 Quad-Core platform running Sage 7.5.1: I tried

time a=factorial(10000000)

It showed completing in around 3 seconds

Same command on a 2015 MacBook Pro 15in with 5th Generation Quadcore Core i7, the same factorial evaluation showed a completion time of about 5 seconds.

Same performance of 3 seconds was shown even when Ubuntu was run on a VM with same Core i7 processor.

2013-01-17 19:35:31 +0100 received badge  Famous Question (source)
2012-10-18 01:20:03 +0100 received badge  Notable Question (source)
2012-08-20 08:07:23 +0100 received badge  Popular Question (source)
2012-03-30 21:35:03 +0100 commented answer TypeError: range() integer end argument expected, got sage.symbolic.expression.Expression.

Thanks that solves the issue for me. I went the symbolic route thinking that floating-point round-off errors will be managed better by the sage tools.

2012-03-30 14:13:03 +0100 received badge  Student (source)
2012-03-30 11:19:32 +0100 commented question TypeError: range() integer end argument expected, got sage.symbolic.expression.Expression.

moved comment...

2012-03-30 11:07:28 +0100 received badge  Supporter (source)
2012-03-30 03:38:42 +0100 asked a question TypeError: range() integer end argument expected, got sage.symbolic.expression.Expression.

I am trying to generate some plots using the following function definition

var('p N M W C')
assume(C,'integer')
pc(p,W) = 1 - (1-p)^W
prc(p,M,W,C) = 1 - sum(binomial(M,i)*pc(p,W)^i*(1-pc(p,W))^(M-i) for i in range(C))
pcol(p,N,M,W,C) = 1 - (1-prc(p,M,W,C))^N
plot(pcol(p/2.0^33,2^20,2^10,8,1),p,0,1000)

However, I get range TypeError even when I have declared that C is integer type. See error listing below:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_34.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("dmFyKCdwIE4gTSBXIEMnKQphc3N1bWUoQywnaW50ZWdlcicpCnBjKHAsVykgPSAxIC0gKDEtcCleVwpwcmMocCxNLFcsQykgPSAxIC0gc3VtKGJpbm9taWFsKE0saSkqcGMocCxXKV5pKigxLXBjKHAsVykpXihNLWkpIGZvciBpIGluIHJhbmdlKEMpKQpwY29sKHAsTixNLFcsQykgPSAxIC0gKDEtcHJjKHAsTSxXLEMpKV5OCnBsb3QocGNvbChwLzIuMF4zMywyXjIwLDJeMTAsOCwxKSxwLDAsMTAwMCk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/private/var/folders/04/ymgbq2r15hx_q1knz7jxlqzc0000gn/T/tmpcfnMcC/___code___.py", line 6, in <module>
    __tmp__=var("p,M,W,C"); prc = symbolic_expression(_sage_const_1  - sum(binomial(M,i)*pc(p,W)**i*(_sage_const_1 -pc(p,W))**(M-i) for i in range(C))).function(p,M,W,C)
TypeError: range() integer end argument expected, got sage.symbolic.expression.Expression.