Git Product home page Git Product logo

rediscovery-of-math's Introduction

Hello world, I'm Fatih
end-to-end back-end developer
• Currently working on Spring Boot and Java
• I have experience in full stack project development, testing and deployment
• I am proficient in design patterns and agile project management
• I have a bachelor's degree in Computer Science
I'm working on developing myself in the back-end field as best as I can

Linkedin Badge Static Badge yarliganfatih
NextJS • T-SQL • React Native • Typescript • PHP

rediscovery-of-math's People

Watchers

 avatar

rediscovery-of-math's Issues

Why can't I get the factorial of negative numbers?

Isn't the factorial obtained by multiplying the numbers up to the start (0) of a number?

Positive numbers decrease to return to origin, negative numbers can increase to origin.

We can achieve this with a simple dynamic variable.
51ae5e1

const fact = (a) => {
    let ka = getCoefficient(a);
    if (remainder(a, 1) != 0) return undefined;
    if (a == 0) return ka;
    return mult(a, fact(subt(a, ka))); // In this way, negative numbers are multiplied by iteratively towards 0, too.
}

If we look at the results

  • (-one)! = -1
  • (-2)! = (-2)*(-1) = 2
  • (-3)! = (-3)(-2)(-1) = -6
  • (-4)! = (-4)(-3)(-2)*(-1) = 24
    ...
    As you can see, this was the handicap of negative numbers. Just like exponential numbers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.