[Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Siddharth Sehgal
Hi there I am a novice python user and am a physics masters student. I am trying to use the Sellmeier Equation to calculate a refractive index. The coefficients of this equation are decimals to a large number of sig figs ( i.e B1 = 1.03961212, B2 = 0.231792344, C1 = 6.00069867×10−3 ... and so

Re: [Tutor] Tutor Digest, Vol 166, Issue 21

2017-12-25 Thread Alan Gauld via Tutor
On 25/12/17 03:46, anish singh wrote: However, I am stuck. I have below code which is not working. I don't know how to achieve this programmatically: sorted by the number of occurrences in a descending order. If two or more words have the same count, they should be sorted alphabetically (in an

Re: [Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Alan Gauld via Tutor
On 25/12/17 09:08, Siddharth Sehgal wrote: physics masters student. I am trying to use the Sellmeier Equation I originally state them as floats. However such a process apparently > cannot be done with "floats" like these. It can be done just with a large error (although as a physics g

Re: [Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Steven D'Aprano
On Mon, Dec 25, 2017 at 01:08:13PM +0400, Siddharth Sehgal wrote: > Hi there > > > I am a novice python user and am a physics masters student. I am > trying to use the Sellmeier Equation to calculate a refractive index. > The coefficients of this equation are decimals to a large number of > si

Re: [Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Steven D'Aprano
On Mon, Dec 25, 2017 at 01:08:13PM +0400, Siddharth Sehgal wrote: > The actual equation is below screen shotted No it isn't -- either you forgot to attach it, or the mailing list removed it. Do you mean this equation? https://en.wikipedia.org/wiki/Sellmeier_equation I suggest you try using P

Re: [Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Steven D'Aprano
On Mon, Dec 25, 2017 at 09:45:35AM +, Alan Gauld via Tutor wrote: > On 25/12/17 09:08, Siddharth Sehgal wrote: > > >physics masters student. I am trying to use the Sellmeier Equation > > >I originally state them as floats. However such a process apparently > > >cannot be done with "floa