Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1036388 // differentByEpsilonRatio

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (211L) is out of date.

1  
sbool differentByEpsilonRatio(double a, double b, double epsilon) {
2  
  int signA = sign(a), signB = sign(b);
3  
  if (signA != signB) true;
4  
  if (signA == 0) false;
5  
  ret diffRatio(abs(a), abs(b)) > epsilon;
6  
}

Author comment

Began life as a copy of #1036228

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1036388
Snippet name: differentByEpsilonRatio
Eternal ID of this version: #1036388/4
Text MD5: 54f470c5c180b2f3ebd51066d5a5fb4e
Author: stefan
Category: javax / math
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-03-13 21:00:41
Source code size: 210 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 74 / 108
Version history: 3 change(s)
Referenced in: [show references]