Jump to content
UBot Underground

Eval Multiply not working


Recommended Posts

Hi Guys

Anyone having an issue with the eval multiply reults?

I get odd results like "8.73e+006"

 

The eval math function is not working.
A basic math sum like 873000 * 10 = 8.73e+006
It should be 8730000

 

Im sure it not the code. Started happening since 5.7 update

Is it just me or is there an actual bug?

 

 

 

if($comparison($scrape attribute($element offset(<style="text-align: right">, 0), "innertext"), "=", $nothing)) {
then {
set(#Psys_ptkw_cmp, 0, "Global")
set(#Psys_ptkw_cmp, 2000000, "Global")
set(#Psys_ptkw_cmp, $replace($trim(#Psys_ptkw_cmp), ",", $nothing), "Global")
set(#Psys_ptkw_ceiling, $nothing, "Global")
set(#Psys_ptkw_ceiling, $eval($multiply(#Psys_ptkw_cmp, #Psys_ptkw_ceiling)), "Global")
}
else {
set(#Psys_ptkw_cmp, 0, "Global")
set(#Psys_ptkw_cmp, $scrape attribute($element offset(<style="text-align: right">, 0), "innertext"), "Global")
set(#Psys_ptkw_cmp, $replace($trim(#Psys_ptkw_cmp), ",", $nothing), "Global")
set(#Psys_ptkw_ceiling, $nothing, "Global")
set(#Psys_ptkw_ceiling, $eval($multiply(#Psys_ptkw_cmp, #Psys_Drill_ceiling)), "Global")
}
}

Link to post
Share on other sites

The reason you get that instead of a whole number is computer accuracy...the problem is that some numbers are too large to write them with digits only, that's why exponent is used. Refer to this page: http://en.wikipedia.org/wiki/Floating_point

 

So, you won't be able to get a number consisting of digits only if your number is high, you'll always get exponent.

Link to post
Share on other sites

Thanks for the reply.

This is so annoying

so why was it working before the update to 5.7.

I working with competing pages and I use the the competing pages number x 10 as a ceiling for me to do analysis.

I have never had this issue in the last 4 years and now that I need the functionality at a critical point in a project the update stuffs up the math functions.

 

Is there a way to calculate the number I need using JavaScript?

Link to post
Share on other sites
  • 10 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...