- Posts: 6
- Thank you received: 0
- Forum
- Support questions
- WooPrice Calculator (Pro)
- [SOLVED]Warning: sqrt() expects parameter 1 to be float
×
WooPrice Calculator PRO
[SOLVED]Warning: sqrt() expects parameter 1 to be float
- Brendan Thome
- Topic Author
- Offline
Less
More
7 months 3 weeks ago #2057
by Brendan Thome
Brendan Thome replied the topic: Uploads Correctly, Displays Wrong
Hi Bill
I just wanted to let you know that the problem is solved. In the end it wasn´t the rounding of numbers that brought the difficulty. The problem laid in WPC pulling data differently then Excel. This isn´t a huge issue. It just means, that you have to troubleshoot extensively. Our tables are quite complex. So I might have to go back 10 steps and upload the data step for step to see where exactly the data is pulled in differently. It took me about 20 hours to solve all the problems, but what´s necessary is necessary. I just wanted to let you know that rounding the numbers is no issue at all. As far as I can see at this point WPC has no problem at all with cells that have, lets say, 15 decimals.
Take Care
Brendan
I just wanted to let you know that the problem is solved. In the end it wasn´t the rounding of numbers that brought the difficulty. The problem laid in WPC pulling data differently then Excel. This isn´t a huge issue. It just means, that you have to troubleshoot extensively. Our tables are quite complex. So I might have to go back 10 steps and upload the data step for step to see where exactly the data is pulled in differently. It took me about 20 hours to solve all the problems, but what´s necessary is necessary. I just wanted to let you know that rounding the numbers is no issue at all. As far as I can see at this point WPC has no problem at all with cells that have, lets say, 15 decimals.
Take Care
Brendan
Please Log in or Create an account to join the conversation.
- bill
- Offline
Less
More
- Posts: 52
- Thank you received: 8
7 months 3 weeks ago #2042
by bill
bill replied the topic: Uploads Correctly, Displays Wrong
Hi Brendan,
you have to round the cells that contain simple mathematical calculation but returns long numbers. Like for example in the excel file you are using
the cell G3 has a formula that depends on a lot of other cells for example one is CD132, that by its own depends on other cells and this goes even more deeper. You have to make sure to round the cells of which this ones depends with the Round() formula that excel has
before summing them up. So the idea is to round every cell that will produce a long number before it is involved in other calculations. This will fix the problem.
Best regards
Bill
AT979
you have to round the cells that contain simple mathematical calculation but returns long numbers. Like for example in the excel file you are using
the cell G3 has a formula that depends on a lot of other cells for example one is CD132, that by its own depends on other cells and this goes even more deeper. You have to make sure to round the cells of which this ones depends with the Round() formula that excel has
before summing them up. So the idea is to round every cell that will produce a long number before it is involved in other calculations. This will fix the problem.
Best regards
Bill
AT979
Please Log in or Create an account to join the conversation.
- Brendan Thome
- Topic Author
- Offline
Less
More
- Posts: 6
- Thank you received: 0
8 months 8 hours ago #2030
by Brendan Thome
Brendan Thome replied the topic: Uploads Correctly, Displays Wrong
Hi Bill,
thanks for that tip. The numbers weren´t endless, but they were long. Something like 12 digits long. I´m stating that in case that makes a difference.
I´m not getting the "#DIV0!" anymore since I rounded as you suggested. So thats great. It is very clear now though that numbers with many digits are not taken in very well by WPC since the number that is being display instead of the #DIV0! isn´t correct either. Somehow the programm gets messed up.
So first I had a 1,40026841817559. That became a "#DIV0!" as described in my earlier messages to you. Then I rounded. So it became round(1,40026841817559) which obviously makes it 1,40. On the front end this becomes 11,90. So the problem has improved slightly since 11,90 is better than #DIV0!. But the number being displayed is of course not quite right yet.
That´s where I see the issue. Do you see any way around this?
Best Regards
Brendan
1: This is where "1,40026841817559" I´m talking about is placed.
2: This is whats being displayed on the front end with round(1,40026841817559).
thanks for that tip. The numbers weren´t endless, but they were long. Something like 12 digits long. I´m stating that in case that makes a difference.
I´m not getting the "#DIV0!" anymore since I rounded as you suggested. So thats great. It is very clear now though that numbers with many digits are not taken in very well by WPC since the number that is being display instead of the #DIV0! isn´t correct either. Somehow the programm gets messed up.
So first I had a 1,40026841817559. That became a "#DIV0!" as described in my earlier messages to you. Then I rounded. So it became round(1,40026841817559) which obviously makes it 1,40. On the front end this becomes 11,90. So the problem has improved slightly since 11,90 is better than #DIV0!. But the number being displayed is of course not quite right yet.
That´s where I see the issue. Do you see any way around this?
Best Regards
Brendan
1: This is where "1,40026841817559" I´m talking about is placed.
2: This is whats being displayed on the front end with round(1,40026841817559).
Please Log in or Create an account to join the conversation.
- bill
- Offline
Less
More
- Posts: 52
- Thank you received: 8
8 months 1 day ago #2028
by bill
bill replied the topic: Uploads Correctly, Displays Wrong
Hello Brendan,
we were working on finding a solution for the problem that you present.
We notice that in the excel file that you are using in your calculator, your results have endless periodic number like in the filed of "Montage".
You need to use "Round()" excel formula to round those endless periodic number, like this you don't have problem with calculator.
Waiting for your feedback
Kind Regards,
Bill
AT979
we were working on finding a solution for the problem that you present.
We notice that in the excel file that you are using in your calculator, your results have endless periodic number like in the filed of "Montage".
You need to use "Round()" excel formula to round those endless periodic number, like this you don't have problem with calculator.
Waiting for your feedback
Kind Regards,
Bill
AT979
Please Log in or Create an account to join the conversation.
- Brendan Thome
- Topic Author
- Offline
Less
More
- Posts: 6
- Thank you received: 0
8 months 2 days ago #2017
by Brendan Thome
Brendan Thome replied the topic: Uploads Correctly, Displays Wrong
Hi Bill,
let me know If I can supply more information.
Best Regards
Brendan
let me know If I can supply more information.
Best Regards
Brendan
Please Log in or Create an account to join the conversation.
- bill
- Offline
Less
More
- Posts: 52
- Thank you received: 8
8 months 3 days ago #2016
by bill
bill replied the topic: Uploads Correctly, Displays Wrong
Hello Brendan,
sorry for the delay of giving you an answer.
We are trying to find a solution of the problem that you present but we cant reproduce in our local environment.
Could you please send us the calculator.zip(export of the zip folder from WPC) with the new file that you have created so we can make a check ?
Waiting for your response.
Kind Regards,
Bill
AT979
sorry for the delay of giving you an answer.
We are trying to find a solution of the problem that you present but we cant reproduce in our local environment.
Could you please send us the calculator.zip(export of the zip folder from WPC) with the new file that you have created so we can make a check ?
Waiting for your response.
Kind Regards,
Bill
AT979
Please Log in or Create an account to join the conversation.
- Brendan Thome
- Topic Author
- Offline
Less
More
- Posts: 6
- Thank you received: 0
8 months 3 days ago #2011
by Brendan Thome
Brendan Thome replied the topic: Uploads Correctly, Displays Wrong
Hi Bill,
Documentation
I changed all "sqrt()" into "^0,5". That solved the problem for which I initially opened this ticket. Though another occured and a second one I thought would be solved by the sqrt() is not. I documented this with the Screenshot and Excel "After" and "Before".
Problem 1
As you see in the Screenshot "Wrong Numbers" the numbers in WPC are not the same as on the Front-End of the Website itself. How can I solve this problem since everything seems to be uploading correctly and then suddenly displays is differently on the front end.
Problem 2
The same goes for the screenshot "#DIV0!". It uploads correctly, but then doesn´t display online at all. Can you help me out here?
Best Regards
Brendan
Documentation
I changed all "sqrt()" into "^0,5". That solved the problem for which I initially opened this ticket. Though another occured and a second one I thought would be solved by the sqrt() is not. I documented this with the Screenshot and Excel "After" and "Before".
Problem 1
As you see in the Screenshot "Wrong Numbers" the numbers in WPC are not the same as on the Front-End of the Website itself. How can I solve this problem since everything seems to be uploading correctly and then suddenly displays is differently on the front end.
Problem 2
The same goes for the screenshot "#DIV0!". It uploads correctly, but then doesn´t display online at all. Can you help me out here?
Best Regards
Brendan
Please Log in or Create an account to join the conversation.
- bill
- Offline
Less
More
- Posts: 52
- Thank you received: 8
8 months 2 weeks ago #1976
by bill
bill replied the topic: Warning: sqrt() expects parameter 1 to be float
Hello Brendan,
we were working on finding the solution of the problem that you present.
The error generated form your site its not created by our plugin or conditional logic but from the PHPExcel library.
The error is caused by the formulas sqrt() that you are using inside of your excel file.
Some of them are getting a string(text) argument instead of a float(number) value.
Please check the arguments that your sqrt() formulas takes.
Waiting for your feedback
Kind Regards,
Bill
AT979
we were working on finding the solution of the problem that you present.
The error generated form your site its not created by our plugin or conditional logic but from the PHPExcel library.
The error is caused by the formulas sqrt() that you are using inside of your excel file.
Some of them are getting a string(text) argument instead of a float(number) value.
Please check the arguments that your sqrt() formulas takes.
Waiting for your feedback
Kind Regards,
Bill
AT979
Please Log in or Create an account to join the conversation.
- Brendan Thome
- Topic Author
- Offline
Less
More
- Posts: 6
- Thank you received: 0
8 months 2 weeks ago #1974
by Brendan Thome
Brendan Thome created the topic: Warning: sqrt() expects parameter 1 to be float
Hi WPC,
I´ve been struggling quite a while with this error message. We´re presenting our material to a customer tomorrow and I just can´t find a way around this problem. On this product ( techtinyhouse.de/shop/rohbau/staenderwerk/ ) I get the following error-message as you can see yourself on the site. If the calculations were still correct I wouldn´t bother with the warning for now. But the calculation isn´t correct.
Warning: sqrt() expects parameter 1 to be float, string given in /home/techtiny/public_html/wp-content/plugins/woo-price-calculator/admin/resources/lib/PHPExcel/Classes/PHPExcel/Calculation.php on line 3452
I´m quite sure the warning didn´t exist before I put the conditional logic in. I deleted all of it again, but the warning doesn´t disappear anymore.I could upload fresh, but the conditional logic is mandatory.
Best Regards
Brendan
Attachements
- 3 screenshots of the calculation
- export ZIP-folder from WPC itself
- the php-file the warning is directing to
I´ve been struggling quite a while with this error message. We´re presenting our material to a customer tomorrow and I just can´t find a way around this problem. On this product ( techtinyhouse.de/shop/rohbau/staenderwerk/ ) I get the following error-message as you can see yourself on the site. If the calculations were still correct I wouldn´t bother with the warning for now. But the calculation isn´t correct.
Warning: sqrt() expects parameter 1 to be float, string given in /home/techtiny/public_html/wp-content/plugins/woo-price-calculator/admin/resources/lib/PHPExcel/Classes/PHPExcel/Calculation.php on line 3452
I´m quite sure the warning didn´t exist before I put the conditional logic in. I deleted all of it again, but the warning doesn´t disappear anymore.I could upload fresh, but the conditional logic is mandatory.
Best Regards
Brendan
Attachements
- 3 screenshots of the calculation
- export ZIP-folder from WPC itself
- the php-file the warning is directing to
Please Log in or Create an account to join the conversation.
Moderators: david
- Forum
- Support questions
- WooPrice Calculator (Pro)
- [SOLVED]Warning: sqrt() expects parameter 1 to be float
Time to create page: 0.198 seconds