Python Forum
math formula does not give the same result as bash script [SOLVED]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
math formula does not give the same result as bash script [SOLVED]
#3
Maybe (for my benefit, least ways) you should explain your formulas.

Also, you have four objects (a,b,c and d) but you have seven lines of output, so it's not altogether clear which object relates to which output.

A good example of the way to show that, would be print(f"a = {a}")

About the above example (which seem to be line four of your output) right now we're in month 4, so 4-14 = -10 and -10 / 12 = -0.8333333333333334
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply


Messages In This Thread
RE: math formula does not give the same result as bash script - by rob101 - Apr-02-2023, 11:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems passing arguments containing spaces to bash script and then on to python kaustin 6 539 Apr-03-2024, 08:26 PM
Last Post: deanhystad
  [SOLVED] [Linux] Script in cron stops after first run in loop Winfried 2 969 Nov-16-2022, 07:58 PM
Last Post: Winfried
  Convert SQLite Fetchone() Result to float for Math Extra 13 3,744 Aug-02-2022, 01:12 PM
Last Post: deanhystad
  math.log versus math.log10 stevendaprano 10 2,521 May-23-2022, 08:59 PM
Last Post: jefsummers
  Call a bash script from within a Python programme Pedroski55 6 2,549 Dec-06-2021, 01:53 PM
Last Post: DeaD_EyE
  {SOLVED]Help getting formula value in Excel to a csv Pedroski55 1 2,087 Sep-20-2021, 12:19 AM
Last Post: Pedroski55
  Python “Formula” Package: How do I parse Excel formula with a range of cells? JaneTan 1 2,742 Jul-12-2021, 11:09 AM
Last Post: jefsummers
  Automatic user/password entry on prompt by bash script PBOX_XS4_2001 3 2,865 May-18-2021, 06:42 PM
Last Post: Skaperen
  Why getting ValueError : Math domain error in trig. function, math.asin() ? jahuja73 3 3,869 Feb-24-2021, 05:09 PM
Last Post: bowlofred
  [SOLVED] Requiring help running an old Python script (non Python savvy user) Miletkir 13 5,581 Jan-16-2021, 10:20 PM
Last Post: Miletkir

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020