Fractions Caculator

User avatar
cogier
Site Admin
Posts: 516
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Fractions Caculator

Post by cogier » Sunday 18th October 2020 1:09pm

I have tried the new version but have run into a some issues.

1/. The menu items don't work. The code should be as below: -
Public Sub mnuFracCalc_Click()

  'Load fractions calculator
  'Workspace1.Add(FracCalc)
  Workspace1.ActiveWindow = FracCalc

End
2/. I tried 1/2 divided by 9/32. The program failed at FracCalc Line 426 (Sum = ValueToConvert). Sum is an Integer and ValToConvert is a String. The answer should be 1 & 7/9.
3/. I tried 1 divided by 8/16. The program failed at FracCalc Line 405 (FirstFrac = (WN1 + Numerator1 / Denominator1)) with a Divide by zero error. The answer should be 2.

Hope that helps.

cage
Posts: 80
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: Fractions Caculator

Post by cage » Sunday 18th October 2020 11:11pm

Thanks Charlie for the input. I will look into fixing it. As for the menus I originally had them there to load the different parts of the program. I should of deleted them since the are all loaded at runtime.

cage
Posts: 80
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: Fractions Caculator

Post by cage » Monday 19th October 2020 12:29am

Found the problem but it was in a different location. Now 1/2 / 9/32=1 25/32 instead of 1 7/9. This because 7/9 is not a measurement in construction calculations, meaning the smallest number in in 64s. Now 1 / 8/16=2 as you said. I remove the unnecessary items from the menu. The updated version is in the first post. I am always happy Charlie when you give your input. I am a retired cabinet designer and builder and use this program in my design work. Since there are no cabinet programs in Linux I now have to do the design work mostly by hand. The errors are a result of staying up way to late to complete a project, so I end up over looking things. :oops:

User avatar
cogier
Site Admin
Posts: 516
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Fractions Caculator

Post by cogier » Tuesday 20th October 2020 3:08pm

Hi cage,

Your program seems to work as expected now. I took the liberty of remaking the 'ConvChart' complete with a search.

Hope it is of use.
HandymanCalc-0.1.tar.gz
(17.65 KiB) Downloaded 3 times

cage
Posts: 80
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: Fractions Caculator

Post by cage » Tuesday 20th October 2020 6:11pm

Thanks Charlie, that actually makes the program perfect. Don't know why I didn't think of that :oops:

PJBlack
Posts: 29
Joined: Tuesday 09th June 2020 10:26pm

Re: Fractions Caculator

Post by PJBlack » Wednesday 21st October 2020 2:08am

manjaro xfce and gambas 3.15.90:

1/2 + 1/2 -> Type mismatch: wanted float got string instead : 2 + 3/3=3 is correct

pushing 9 left field -> 1

123456789 X 9=98765424 (never ever) galculator gives me 1111111101

so IF that thing IS calculating i need a second calculator to proof the result ... nice

cage
Posts: 80
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: Fractions Caculator

Post by cage » Wednesday 21st October 2020 3:24am

1/2 + 1/2 -> Type mismatch: wanted float got string instead : 2 + 3/3=3 is correct

pushing 9 left field -> 1

123456789 X 9=98765424 (never ever) galculator gives me 1111111101

so IF that thing IS calculating i need a second calculator to proof the result ... nice
Sorry to say I can not duplicate your problem with 1/2+1/2 as it comes out as 1 in Arch Linux. This program was never meant to be use as a standard calculator although it can for normal usage. Taking something like 123456789 X 9 is just a Lucretius example to prove that the calculator is no good. If galculator serves you well then you have no need for this program, then don't use it. Others may find it useful and use it. How ever I did find one small overlooked problem and fixed it. By the way 3/3 is not a normal fraction used in construction. Construction fractions are based in 64ths. Look at the conversion chart and you will see what I mean. Personally I don't mind people finding things amiss with the program, but constructively. Besides I only meant that Charlies mod to my program made the conversion chart perfect and not the whole program. The fix will be in the first post for those who want it.

User avatar
cogier
Site Admin
Posts: 516
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Fractions Caculator

Post by cogier » Wednesday 21st October 2020 5:07pm

I tried ½ + ½ and got 1 as well.

Image

Post Reply