You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/04/03 10:12:28 UTC

[commons-numbers] 01/02: Update attribution of 3rd party works in Complex

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit e6aa0883c4a3ccdb799ba6a49777b6ac958badb2
Author: aherbert <ah...@apache.org>
AuthorDate: Fri Apr 3 10:56:40 2020 +0100

    Update attribution of 3rd party works in Complex
    
    In accordance with https://www.apache.org/legal/src-headers.html#3party
    
    - "Do not remove or modify any copyright notices or licenses"
    - "Minor modifications/additions to 3rd party source files should
    typically be licensed under the same terms as the rest of the 3rd party
    source for convenience"
    
    Here the 3rd party works are software conversions of single methods with
    minor modifications. The methods are marked as distributed under the
    original terms and the original copyright and license notice are
    included inline.
    
    Added copyright attribution to NOTICE.
    
    Updated LICENSE to indicate the parts of 'commons-numbers' which are
    subject to a different license.
---
 LICENSE                                            | 90 ++++++++++++----------
 NOTICE                                             | 10 +++
 commons-numbers-complex/LICENSE                    | 90 ++++++++++++----------
 commons-numbers-complex/NOTICE                     | 10 +++
 .../apache/commons/numbers/complex/Complex.java    | 21 +++--
 5 files changed, 129 insertions(+), 92 deletions(-)

diff --git a/LICENSE b/LICENSE
index 2ae0957..daa5921 100644
--- a/LICENSE
+++ b/LICENSE
@@ -200,45 +200,51 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
-================================================================================
-
-Class "org.apache.commons.numbers.complex.Complex" contains
-Java code partly ported from the "Freely Distributable Math Library" in C.
-The source files contain the following notice:
-
-  Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
-
-  Developed at SunSoft, a Sun Microsystems, Inc. business.
-  Permission to use, copy, modify, and distribute this
-  software is freely granted, provided that this notice
-  is preserved.
-
-================================================================================
-
-Class "org.apache.commons.numbers.complex.Complex" contains
-Java code partly ported from the "Boost C++ Libraries" <boost/math/complex>.
-The source files contain the following notice:
-
-  Boost Software License - Version 1.0 - August 17th, 2003
-
-  Permission is hereby granted, free of charge, to any person or organization
-  obtaining a copy of the software and accompanying documentation covered by
-  this license (the "Software") to use, reproduce, display, distribute,
-  execute, and transmit the Software, and to prepare derivative works of the
-  Software, and to permit third-parties to whom the Software is furnished to
-  do so, all subject to the following:
-
-  The copyright notices in the Software and this entire statement, including
-  the above license grant, this restriction and the following disclaimer,
-  must be included in all copies of the Software, in whole or in part, and
-  all derivative works of the Software, unless such copies or derivative
-  works are solely in the form of machine-executable object code generated by
-  a source language processor.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-  FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-  SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-  FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-  DEALINGS IN THE SOFTWARE.
+
+
+APACHE COMMONS NUMBERS SUBCOMPONENTS:
+
+Apache Commons Numbers includes a number of subcomponents with separate
+copyright notices and license terms. Your use of these subcomponents is
+subject to the terms and conditions of the following licenses.
+
+
+For the Commons Numbers Complex (commons-numbers-complex-x.x.x.jar)
+component:
+
+   * Part of Complex is licensed under the Freely Distributable Math
+     Library License and the Boost Software License Version 1.0
+
+Freely Distributable Math Library License
+
+Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+
+Developed at SunSoft, a Sun Microsystems, Inc. business.
+Permission to use, copy, modify, and distribute this
+software is freely granted, provided that this notice
+is preserved.
+
+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/NOTICE b/NOTICE
index b5e797a..0e8b9f1 100644
--- a/NOTICE
+++ b/NOTICE
@@ -4,3 +4,13 @@ Copyright 2001-2020 The Apache Software Foundation
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
+For portions of the Commons Numbers Complex component
+The org.apache.commons.numbers.complex package contains derivative
+work originating from the "Freely Distributable Math Library".
+https://www.netlib.org/fdlibm/
+Copyright 1993 Sun Microsystems, Inc.
+
+The org.apache.commons.numbers.complex package contains derivative
+work originating from the "Boost C++ Libraries" <boost/math/complex>.
+https://www.boost.org/
+Copyright 2005 John Maddock 2005.
diff --git a/commons-numbers-complex/LICENSE b/commons-numbers-complex/LICENSE
index 2ae0957..daa5921 100644
--- a/commons-numbers-complex/LICENSE
+++ b/commons-numbers-complex/LICENSE
@@ -200,45 +200,51 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
-================================================================================
-
-Class "org.apache.commons.numbers.complex.Complex" contains
-Java code partly ported from the "Freely Distributable Math Library" in C.
-The source files contain the following notice:
-
-  Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
-
-  Developed at SunSoft, a Sun Microsystems, Inc. business.
-  Permission to use, copy, modify, and distribute this
-  software is freely granted, provided that this notice
-  is preserved.
-
-================================================================================
-
-Class "org.apache.commons.numbers.complex.Complex" contains
-Java code partly ported from the "Boost C++ Libraries" <boost/math/complex>.
-The source files contain the following notice:
-
-  Boost Software License - Version 1.0 - August 17th, 2003
-
-  Permission is hereby granted, free of charge, to any person or organization
-  obtaining a copy of the software and accompanying documentation covered by
-  this license (the "Software") to use, reproduce, display, distribute,
-  execute, and transmit the Software, and to prepare derivative works of the
-  Software, and to permit third-parties to whom the Software is furnished to
-  do so, all subject to the following:
-
-  The copyright notices in the Software and this entire statement, including
-  the above license grant, this restriction and the following disclaimer,
-  must be included in all copies of the Software, in whole or in part, and
-  all derivative works of the Software, unless such copies or derivative
-  works are solely in the form of machine-executable object code generated by
-  a source language processor.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-  FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-  SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-  FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-  DEALINGS IN THE SOFTWARE.
+
+
+APACHE COMMONS NUMBERS SUBCOMPONENTS:
+
+Apache Commons Numbers includes a number of subcomponents with separate
+copyright notices and license terms. Your use of these subcomponents is
+subject to the terms and conditions of the following licenses.
+
+
+For the Commons Numbers Complex (commons-numbers-complex-x.x.x.jar)
+component:
+
+   * Part of Complex is licensed under the Freely Distributable Math
+     Library License and the Boost Software License Version 1.0
+
+Freely Distributable Math Library License
+
+Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+
+Developed at SunSoft, a Sun Microsystems, Inc. business.
+Permission to use, copy, modify, and distribute this
+software is freely granted, provided that this notice
+is preserved.
+
+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/commons-numbers-complex/NOTICE b/commons-numbers-complex/NOTICE
index b5e797a..0e8b9f1 100644
--- a/commons-numbers-complex/NOTICE
+++ b/commons-numbers-complex/NOTICE
@@ -4,3 +4,13 @@ Copyright 2001-2020 The Apache Software Foundation
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
+For portions of the Commons Numbers Complex component
+The org.apache.commons.numbers.complex package contains derivative
+work originating from the "Freely Distributable Math Library".
+https://www.netlib.org/fdlibm/
+Copyright 1993 Sun Microsystems, Inc.
+
+The org.apache.commons.numbers.complex package contains derivative
+work originating from the "Boost C++ Libraries" <boost/math/complex>.
+https://www.boost.org/
+Copyright 2005 John Maddock 2005.
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
index ac87950..1733ca3 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
@@ -1809,12 +1809,13 @@ public final class Complex implements Serializable  {
      * <p>This function exists to allow implementation of the identity
      * {@code asinh(z) = -i asin(iz)}.
      *
-     * <p>Adapted from {@code <boost/math/complex/asin.hpp>}.
+     * <p>Adapted from {@code <boost/math/complex/asin.hpp>}. This method only (and not
+     * invoked methods within) is distributed under the Boost Software License V1.0.
      * The original notice is shown below and the licence is shown in full in LICENSE:
      * <pre>
      * (C) Copyright John Maddock 2005.
      * Distributed under the Boost Software License, Version 1.0. (See accompanying
-     * file LICENSE.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
+     * file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
      * </pre>
      *
      * @param real Real part.
@@ -2002,12 +2003,13 @@ public final class Complex implements Serializable  {
      * <p>This function exists to allow implementation of the identity
      * {@code acosh(z) = +-i acos(z)}.
      *
-     * <p>Adapted from {@code <boost/math/complex/acos.hpp>}.
+     * <p>Adapted from {@code <boost/math/complex/acos.hpp>}. This method only (and not
+     * invoked methods within) is distributed under the Boost Software License V1.0.
      * The original notice is shown below and the licence is shown in full in LICENSE:
      * <pre>
      * (C) Copyright John Maddock 2005.
      * Distributed under the Boost Software License, Version 1.0. (See accompanying
-     * file LICENSE.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
+     * file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
      * </pre>
      *
      * @param real Real part.
@@ -2704,11 +2706,13 @@ public final class Complex implements Serializable  {
      * <p>This function exists to allow implementation of the identity
      * {@code atan(z) = -i atanh(iz)}.
      *
+     * <p>Adapted from {@code <boost/math/complex/atanh.hpp>}. This method only (and not
+     * invoked methods within) is distributed under the Boost Software License V1.0.
      * The original notice is shown below and the licence is shown in full in LICENSE:
      * <pre>
      * (C) Copyright John Maddock 2005.
      * Distributed under the Boost Software License, Version 1.0. (See accompanying
-     * file LICENSE.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
+     * file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
      * </pre>
      *
      * @param real Real part.
@@ -2784,6 +2788,7 @@ public final class Complex implements Serializable  {
                 } else {
                     // |x| < 1: Use high precision if possible:
                     // 1 - x^2 - y^2 = -(x^2 + y^2 - 1)
+                    // Modified from boost to use the custom high precision method.
                     denominator = -x2y2m1(x, y);
                 }
                 im = Math.atan2(numerator, denominator);
@@ -3475,9 +3480,9 @@ public final class Complex implements Serializable  {
      * performance gains are related to edge case handling and elimination of an unpredictable
      * branch in the computation of {@code x^2 + y^2}.
      *
-     * <p>This port was adapted from the c source code for the
-     * "Freely Distributable Math Library" hypot function.
-     * The original notice is shown below:
+     * <p>This port was adapted from the "Freely Distributable Math Library" hypot function.
+     * This method only (and not invoked methods within) is distributed under the terms of the
+     * original notice as shown below:
      * <pre>
      * ====================================================
      * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.