You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "maciej-flexcompute (via GitHub)" <gi...@apache.org> on 2023/05/01 10:27:53 UTC

[GitHub] [echarts] maciej-flexcompute commented on issue #18437: Hope xAxis of Stack Line support value

maciej-flexcompute commented on issue #18437:
URL: https://github.com/apache/echarts/issues/18437#issuecomment-1529559347

   @helgasoft 
   
   Your example looks exactly like what I am looking for.
   
   > But in general case (interval are real numbers) this is not possible to find such interval.
   
   Here is the proof:
   
   > lets take `a`, `b` real numbers which represents intervals between points. We are looking for such interval `c` that `a = p * c` and `b = q * c` where `p, q` are whole numbers and they have no common factors. I will show that such interval `c` does not exist if `a=sqrt(2)` and `b=sqrt(3)`. We have respectively:
   > `sqrt(2) = p * c` and `sqrt(3) = q * c`. We have `sqrt(2) * q = sqrt(3) * p`. We can raise to power 2 both sides:
   > `2 * q^2 = 3* p^2`. We can see that left-hand side is even, thus, `p^2` must be even, thus `p` must be even, right-hand side is divisible by 4, thus `q^2` must be even, => q is even. We showed that both p and q are even which is in contradicts statement that `p, q` are whole numbers and they have no common factors. 
   
   Mathematically it is not possible, but numerically it is possible since we represent numbers double precision, so at least 1e-16 can work. And practically speaking human cannot visually distinguish ~1e-5.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org