New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]Infinity Class #916

Closed
wants to merge 15 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@CodeMaxx
Copy link
Contributor

CodeMaxx commented Apr 15, 2016

  • Inherit Infinity from Number
  • Implement various member functions
  • Implement constants Inf, NegInf, ComplexInf
  • Differentiation
  • Printing
  • Added tests
  • pow, powr and div in Infinity class
  • Handle Infinity in Add, Mul, Pow class
  • Add leftout tests
  • Change name to Infinity
  • Check for Infinity TODOs in functions like hyperbolic functions, log(0) etc.
  • Implement for all directions if it seems necesary.
  • Think of other possible enhancements

The class name Infinity was giving error on my machine which I possible believe is due to overlap with some already define Infinity. I'll look into this matter later. Currently the class is name Infinit.

@isuruf @certik Please Review and comment.

@CodeMaxx

This comment has been minimized.

Copy link
Contributor

CodeMaxx commented Apr 15, 2016

I will not be available in the following week due to my final exams. Will be back by Saturday.

Cheers!

Edit: Seemingly I can't keep myself away from open source. 😄 I'm available this week.

@CodeMaxx CodeMaxx force-pushed the CodeMaxx:infinity branch 4 times, most recently from bbf01cb to ea12465 Apr 16, 2016

@@ -519,6 +520,12 @@ class DiffImplementation
return self.diff_impl(x);
}

static RCP<const Basic> diff(const Infinit &self,

This comment has been minimized.

@isuruf

isuruf Apr 16, 2016

Member

This is not necessary

This comment has been minimized.

@CodeMaxx

CodeMaxx Apr 16, 2016

Contributor

I see. We already have it defined for Number. Will remove this.

return make_rcp<const Infinit>(*this);
}

RCP<const Number> Infinit::sub(const Number &other) const

This comment has been minimized.

@isuruf

isuruf Apr 16, 2016

Member

This is not necessary.

This comment has been minimized.

@CodeMaxx

CodeMaxx Apr 16, 2016

Contributor

You mean we can use add with a negative number instead ?

This comment has been minimized.

@isuruf

isuruf Apr 18, 2016

Member

No, this is the default implementation in Number. So this is redundant

This comment has been minimized.

@CodeMaxx

CodeMaxx Apr 18, 2016

Contributor

👍

RCP<const Number> Infinit::add(const Number &other) const
{
if (not is_a<Infinit>(other))
return make_rcp<const Infinit>(*this);

This comment has been minimized.

@isuruf

isuruf Apr 16, 2016

Member

return this->rcp_from_this();

This comment has been minimized.

@CodeMaxx

CodeMaxx Apr 16, 2016

Contributor

Are these different or is it SymEngine's convention?

This comment has been minimized.

@CodeMaxx

This comment has been minimized.

@isuruf

isuruf Apr 18, 2016

Member

Different. First one creates a new object, while the other returns a RCP to this.

This comment has been minimized.

@CodeMaxx

CodeMaxx Apr 18, 2016

Contributor

Cool got it.

@isuruf

This comment has been minimized.

Copy link
Member

isuruf commented Apr 16, 2016

Looks good to me so far

@CodeMaxx

This comment has been minimized.

Copy link
Contributor

CodeMaxx commented Apr 16, 2016

@isuruf Anything you would like added to the TODO list in the PR comment?

@CodeMaxx CodeMaxx force-pushed the CodeMaxx:infinity branch from 823cf71 to 0055de7 Apr 18, 2016

@CodeMaxx CodeMaxx closed this Apr 23, 2016

@CodeMaxx

This comment has been minimized.

Copy link
Contributor

CodeMaxx commented Apr 24, 2016

Note that I've closed this temporarily(obviously)... I'll be continuing this in some time.

@CodeMaxx CodeMaxx reopened this Apr 26, 2016

@isuruf isuruf referenced this pull request Jun 8, 2016

Closed

`subs(1/x, x, 0)` is 0 #22

@isuruf isuruf referenced this pull request Jul 29, 2016

Merged

Infinity class #1048

0 of 1 task complete
@isuruf

This comment has been minimized.

Copy link
Member

isuruf commented Jul 29, 2016

Closed in favor of #1048

@isuruf isuruf closed this Jul 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment