Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/1425#issuecomment-49853321
  
    @mengxr Sure, maybe the % syntax isn't helpful. I just mean two different 
operators or methods of some kind. Why bother with these issues instead of 
making two methods?
    
    Yes, choosing 1.0 as the switching point removes the discontinuity. I think 
it will surprise readers to find that, in a test with a series of checks like 
"0.1 +- 0.01", "1 +- 0.01", "3 +- 0.01" that the latter doesn't mean 
[2.99,3.01], when the first two do in fact mean [0.09,0.11] and [0.99,1.01], 
which matches what one would expect from all these other unit testing 
frameworks.
    
    @dbtsai I think developing two operators is a good solution If there is a 
separate operator for relative error, you don't need to special-case the 
behavior. Sure it's meaningless to make a relative error test at 0 but you can 
just warn the caller; it's well-defined what happens. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to